public function NotifyRenewEventTest::testNotifyRenewEvent in Ubercart 8.4
Tests the event metadata.
File
- uc_role/
tests/ src/ Unit/ Integration/ Event/ NotifyRenewEventTest.php, line 19
Class
- NotifyRenewEventTest
- Checks that the event "uc_role_notify_renew" is correctly defined.
Namespace
Drupal\Tests\uc_role\Unit\Integration\EventCode
public function testNotifyRenewEvent() {
// Verify our event is discoverable.
$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());
}