NotifyRenewEventTest.php in Ubercart 8.4
File
uc_role/tests/src/Unit/Integration/Event/NotifyRenewEventTest.php
View source
<?php
namespace Drupal\Tests\uc_role\Unit\Integration\Event;
class NotifyRenewEventTest extends RoleEventTestBase {
public function testNotifyRenewEvent() {
$event = $this->eventManager
->createInstance('uc_role_notify_renew');
$order_context_definition = $event
->getContextDefinition('order');
$this
->assertSame('entity:uc_order', $order_context_definition
->getDataType());
$this
->assertSame('Order', $order_context_definition
->getLabel());
$role_context_definition = $event
->getContextDefinition('expiration');
$this
->assertSame('array', $role_context_definition
->getDataType());
$this
->assertSame('Role expiration', $role_context_definition
->getLabel());
}
}