OrderStatusUpdateEventTest.php in Ubercart 8.4
File
uc_order/tests/src/Unit/Integration/Event/OrderStatusUpdateEventTest.php
View source
<?php
namespace Drupal\Tests\uc_order\Unit\Integration\Event;
class OrderStatusUpdateEventTest extends OrderEventTestBase {
public function testOrderStatusUpdateEvent() {
$event = $this->eventManager
->createInstance('uc_order_status_update');
$original_order_context_definition = $event
->getContextDefinition('original_order');
$this
->assertSame('entity:uc_order', $original_order_context_definition
->getDataType());
$this
->assertSame('Original order', $original_order_context_definition
->getLabel());
$order_context_definition = $event
->getContextDefinition('order');
$this
->assertSame('entity:uc_order', $order_context_definition
->getDataType());
$this
->assertSame('Updated order', $order_context_definition
->getLabel());
}
}