Skip to content

Commit 2d06d30

Browse files
committed
Deprecate event triggered assertions
1 parent c9b8692 commit 2d06d30

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

tests/Functional/EventsCest.php

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ public function dontSeeEventTriggered(FunctionalTester $I)
1919
$I->dontSeeEventTriggered([ErrorListener::class, ErrorListener::class]);
2020
}
2121

22+
public function dontSeeEventListenerIsCalled(FunctionalTester $I)
23+
{
24+
$I->amOnPage('/');
25+
$I->dontSeeEventListenerIsCalled(ErrorListener::class);
26+
$I->dontSeeEventListenerIsCalled(new ErrorListener());
27+
$I->dontSeeEventListenerIsCalled([ErrorListener::class, ErrorListener::class]);
28+
}
29+
2230
public function dontSeeOrphanEvent(FunctionalTester $I)
2331
{
2432
$I->amOnPage('/login');
@@ -38,9 +46,17 @@ public function seeEventTriggered(FunctionalTester $I)
3846
$I->seeEventTriggered([SecurityListener::class, RouterDataCollector::class]);
3947
}
4048

49+
public function seeEventListenerIsCalled(FunctionalTester $I)
50+
{
51+
$I->amOnPage('/');
52+
$I->seeEventListenerIsCalled(SecurityListener::class);
53+
$I->seeEventListenerIsCalled(new RouterDataCollector());
54+
$I->seeEventListenerIsCalled([SecurityListener::class, RouterDataCollector::class]);
55+
}
56+
4157
public function seeOrphanEvent(FunctionalTester $I)
4258
{
43-
$I->markTestIncomplete('To do: use a new event for this assertion');
59+
$I->markTestIncomplete('To do: use a new event for this assertion');
4460
$I->amOnPage('/register');
4561
$I->submitSymfonyForm('registration_form', [
4662
'[email]' => 'jane_doe@gmail.com',

0 commit comments

Comments
 (0)