Skip to content

Commit 5f20568

Browse files
github-actions[bot]github-actions[bot]
authored andcommitted
updated
1 parent 68619a7 commit 5f20568

File tree

2 files changed

+104
-7
lines changed

2 files changed

+104
-7
lines changed

changelog.markdown

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,25 @@ title: Codeception Changelog
99

1010

1111

12+
### module-symfony 3.2.0: 3.2.0
13+
14+
Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2024/01/02 03:14:29 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases)
15+
16+
17+
18+
## What's Changed
19+
* Deprecate event triggered assertions by **[xEdelweiss](https://github.com/xEdelweiss)** in https://github.com/Codeception/module-symfony/pull/169
20+
* Update event assertions by **[xEdelweiss](https://github.com/xEdelweiss)** in https://github.com/Codeception/module-symfony/pull/168
21+
* Add seeEvent/dontSeeEvent event assertions by **[xEdelweiss](https://github.com/xEdelweiss)** in https://github.com/Codeception/module-symfony/pull/173
22+
* Various improvements by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/module-symfony/pull/171
23+
* EventsAssertionsTrait refactor and Symfony 6.3 Support by **[TavoNiievez](https://github.com/TavoNiievez)** in https://github.com/Codeception/module-symfony/pull/175
24+
25+
## New Contributors
26+
* **[xEdelweiss](https://github.com/xEdelweiss)** made his first contribution in https://github.com/Codeception/module-symfony/pull/169
27+
28+
**Full Changelog**: https://github.com/Codeception/module-symfony/compare/3.1.1...3.2.0
29+
30+
1231
### Codeception 5.0.13: 5.0.13
1332

1433
Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/12/22 19:46:56 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases)

docs/modules/Symfony.md

Lines changed: 85 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -252,9 +252,9 @@ Authenticates user for HTTP_AUTH
252252

253253
#### amLoggedInAs
254254

255-
* `param UserInterface` $user
255+
* `param \Symfony\Component\Security\Core\User\UserInterface` $user
256256
* `param string` $firewallName
257-
* `param null` $firewallContext
257+
* `param ?string` $firewallContext
258258
* `return void`
259259

260260
Login with the given user object.
@@ -743,8 +743,47 @@ If your app performs a HTTP redirect, you need to suppress it using [stopFollowi
743743
Starting with version 2.0.0, `codeception/module-symfony` requires your app to use [Symfony Mailer](https://symfony.com/doc/current/mailer.html). If your app still uses [Swift Mailer](https://symfony.com/doc/current/email.html), set your version constraint to `^1.6`.
744744

745745

746+
#### dontSeeEvent
747+
748+
* `param string|string[]|null` $expected
749+
* `return void`
750+
751+
Verifies that there were no events during the test.
752+
753+
Both regular and orphan events are checked.
754+
755+
{% highlight php %}
756+
757+
<?php
758+
$I->dontSeeEvent();
759+
$I->dontSeeEvent('App\MyEvent');
760+
$I->dontSeeEvent(['App\MyEvent', 'App\MyOtherEvent']);
761+
762+
{% endhighlight %}
763+
764+
765+
#### dontSeeEventListenerIsCalled
766+
767+
* `param class-string|class-string[]` $expected
768+
* `param string|string[]` $events
769+
* `return void`
770+
771+
Verifies that one or more event listeners were not called during the test.
772+
773+
{% highlight php %}
774+
775+
<?php
776+
$I->dontSeeEventListenerIsCalled('App\MyEventListener');
777+
$I->dontSeeEventListenerIsCalled(['App\MyEventListener', 'App\MyOtherEventListener']);
778+
$I->dontSeeEventListenerIsCalled('App\MyEventListener', 'my.event);
779+
$I->dontSeeEventListenerIsCalled('App\MyEventListener', ['my.event', 'my.other.event']);
780+
781+
{% endhighlight %}
782+
783+
746784
#### dontSeeEventTriggered
747785

786+
@deprecated
748787
* `param object|string|string[]` $expected
749788
* `return void`
750789

@@ -937,7 +976,7 @@ $I->dontSeeOptionIsSelected('#form input[name=payment]', 'Visa');
937976

938977
#### dontSeeOrphanEvent
939978

940-
* `param object|string|string[]` $expected
979+
* `param string|string[]` $expected
941980
* `return void`
942981

943982
Verifies that there were no orphan events during the test.
@@ -951,7 +990,6 @@ of the EventDispatcher but was not handled by any listener after it was dispatch
951990
<?php
952991
$I->dontSeeOrphanEvent();
953992
$I->dontSeeOrphanEvent('App\MyEvent');
954-
$I->dontSeeOrphanEvent(new App\Events\MyEvent());
955993
$I->dontSeeOrphanEvent(['App\MyEvent', 'App\MyOtherEvent']);
956994

957995
{% endhighlight %}
@@ -1171,7 +1209,7 @@ Grabs current page source code.
11711209

11721210
#### grabParameter
11731211

1174-
* `param string` $name
1212+
* `param string` $parameterName
11751213
* `return array|bool|float|int|string|null`
11761214

11771215
Grabs a Symfony parameter
@@ -1676,8 +1714,49 @@ $I->seeEmailIsSent(2);
16761714
{% endhighlight %}
16771715

16781716

1717+
#### seeEvent
1718+
1719+
* `param string|string[]` $expected
1720+
* `return void`
1721+
1722+
Verifies that one or more events were dispatched during the test.
1723+
1724+
Both regular and orphan events are checked.
1725+
1726+
If you need to verify that expected event is not orphan,
1727+
add `dontSeeOrphanEvent` call.
1728+
1729+
{% highlight php %}
1730+
1731+
<?php
1732+
$I->seeEvent('App\MyEvent');
1733+
$I->seeEvent(['App\MyEvent', 'App\MyOtherEvent']);
1734+
1735+
{% endhighlight %}
1736+
1737+
1738+
#### seeEventListenerIsCalled
1739+
1740+
* `param class-string|class-string[]` $expected
1741+
* `param string|string[]` $events
1742+
* `return void`
1743+
1744+
Verifies that one or more event listeners were called during the test.
1745+
1746+
{% highlight php %}
1747+
1748+
<?php
1749+
$I->seeEventListenerIsCalled('App\MyEventListener');
1750+
$I->seeEventListenerIsCalled(['App\MyEventListener', 'App\MyOtherEventListener']);
1751+
$I->seeEventListenerIsCalled('App\MyEventListener', 'my.event);
1752+
$I->seeEventListenerIsCalled('App\MyEventListener', ['my.event', 'my.other.event']);
1753+
1754+
{% endhighlight %}
1755+
1756+
16791757
#### seeEventTriggered
16801758

1759+
@deprecated
16811760
* `param object|string|string[]` $expected
16821761
* `return void`
16831762

@@ -2026,7 +2105,7 @@ $I->seeOptionIsSelected('#form input[name=payment]', 'Visa');
20262105

20272106
#### seeOrphanEvent
20282107

2029-
* `param object|string|string[]` $expected
2108+
* `param string|string[]` $expected
20302109
* `return void`
20312110

20322111
Verifies that one or more orphan events were dispatched during the test.
@@ -2039,7 +2118,6 @@ of the EventDispatcher but was not handled by any listener after it was dispatch
20392118

20402119
<?php
20412120
$I->seeOrphanEvent('App\MyEvent');
2042-
$I->seeOrphanEvent(new App\Events\MyEvent());
20432121
$I->seeOrphanEvent(['App\MyEvent', 'App\MyOtherEvent']);
20442122

20452123
{% endhighlight %}

0 commit comments

Comments
 (0)