You are here

public function OrderCommentAddedEventTest::testOrderCommentAddedEvent in Ubercart 8.4

Tests the event metadata.

File

uc_order/tests/src/Unit/Integration/Event/OrderCommentAddedEventTest.php, line 19

Class

OrderCommentAddedEventTest
Checks that the event "uc_order_comment_added" is correctly defined.

Namespace

Drupal\Tests\uc_order\Unit\Integration\Event

Code

public function testOrderCommentAddedEvent() {

  // Verify our event is discoverable.
  $event = $this->eventManager
    ->createInstance('uc_order_comment_added');
  $order_context_definition = $event
    ->getContextDefinition('order');
  $this
    ->assertSame('entity:uc_order', $order_context_definition
    ->getDataType());
  $this
    ->assertSame('Order', $order_context_definition
    ->getLabel());
}