use Shopware\Core\Framework\App\Flow\Event\Event;
/**
* @internal
*/
class CustomEventTest extends TestCase
{ public function testFromXml(): void
{ $flowEvents = Event::
createFromXmlFile(__DIR__ . '/../_fixtures/valid/flowEventWithFlowEvents.xml'
);
static::
assertNotNull($flowEvents->
getCustomEvents());
static::
assertCount(1,
$flowEvents->
getCustomEvents()->
getCustomEvents());
$firstEvent =
$flowEvents->
getCustomEvents()->
getCustomEvents()[0
];
static::
assertNotNull($firstEvent->
getName());
static::
assertEquals('checkout.order.place.custom',
$firstEvent->
getName());
static::
assertEquals(['orderAware', 'customerAware'
],
$firstEvent->
getAware());
}}