Skip to content

Commit 1d5447a

Browse files
github-actions[bot]github-actions[bot]
authored andcommitted
updated
1 parent 4e96a3b commit 1d5447a

File tree

2 files changed

+107
-0
lines changed

2 files changed

+107
-0
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.4.0: 3.4.0
13+
14+
Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2024/06/09 13:34:44 / [Repository](https://github.com/Codeception/module-symfony) / [Releases](https://github.com/Codeception/module-symfony/releases)
15+
16+
17+
18+
## What's Changed
19+
* Added Symfony Validator assertions in https://github.com/Codeception/module-symfony/pull/189
20+
* Require `tests/bootstrap.php` if exists, to load all necessary `.env` files in https://github.com/Codeception/module-symfony/pull/190
21+
* Added `amLoggedInWithToken` method by **[codedge](https://github.com/codedge)** in https://github.com/Codeception/module-symfony/pull/182
22+
* `grabParameter`: Adding info about `bind` by **[ThomasLandauer](https://github.com/ThomasLandauer)** in https://github.com/Codeception/module-symfony/pull/193
23+
* Added tests for Symfony 7.1 in https://github.com/Codeception/module-symfony/pull/194
24+
25+
## New Contributors
26+
* **[codedge](https://github.com/codedge)** made their first contribution in https://github.com/Codeception/module-symfony/pull/182
27+
28+
**Full Changelog**: https://github.com/Codeception/module-symfony/compare/3.3.2...3.4.0
29+
30+
1231
### module-db 3.1.4: 3.1.4
1332

1433
Released by [![](https://avatars.githubusercontent.com/u/4129631?v=4&s=16) szhajdu](https://github.com/szhajdu) on 2024/05/16 20:15:44 / [Repository](https://github.com/Codeception/module-db) / [Releases](https://github.com/Codeception/module-db/releases)

docs/modules/Symfony.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ and [HttpKernel Component](https://symfony.com/doc/current/components/http_kerne
4444
* `cache_router`: 'false' - Enable router caching between tests in order to [increase performance](http://lakion.com/blog/how-did-we-speed-up-sylius-behat-suite-with-blackfire)
4545
* `rebootable_client`: 'true' - Reboot client's kernel before each request
4646
* `guard`: 'false' - Enable custom authentication system with guard (only for Symfony 5.4)
47+
* `bootstrap`: 'false' - Enable the test environment setup with the tests/bootstrap.php file if it exists or with Symfony DotEnv otherwise. If false, it does nothing.
4748
* `authenticator`: 'false' - Reboot client's kernel before each request (only for Symfony 6.0 or higher)
4849

4950
##### Sample `Functional.suite.yml`
@@ -260,6 +261,14 @@ $I->amLoggedInAs($user);
260261
{% endhighlight %}
261262

262263

264+
#### amLoggedInWithToken
265+
266+
* `param \Symfony\Component\Security\Core\Authentication\Token\TokenInterface` $token
267+
* `param string` $firewallName
268+
* `param ?string` $firewallContext
269+
* `return void`
270+
271+
263272
#### amOnAction
264273

265274
* `param string` $action
@@ -1028,6 +1037,27 @@ $I->dontSeeResponseCodeIs(\Codeception\Util\HttpCode::OK);
10281037
{% endhighlight %}
10291038

10301039

1040+
#### dontSeeViolatedConstraint
1041+
1042+
* `param mixed` $subject
1043+
* `param ?string` $propertyPath
1044+
* `param ?string` $constraint
1045+
* `return void`
1046+
1047+
Asserts that the given subject fails validation.
1048+
1049+
This assertion does not concern the exact number of violations.
1050+
1051+
{% highlight php %}
1052+
1053+
<?php
1054+
$I->dontSeeViolatedConstraint($subject);
1055+
$I->dontSeeViolatedConstraint($subject, 'propertyName');
1056+
$I->dontSeeViolatedConstraint($subject, 'propertyName', 'Symfony\Validator\ConstraintClass');
1057+
1058+
{% endhighlight %}
1059+
1060+
10311061
#### fillField
10321062

10331063
* `param ` $field
@@ -1205,6 +1235,7 @@ Grabs a Symfony parameter
12051235
$I->grabParameter('app.business_name');
12061236

12071237
{% endhighlight %}
1238+
This only works for explicitly set parameters (just using `bind` for Symfony's dependency injection is not enough).
12081239

12091240

12101241
#### grabRepository
@@ -2319,6 +2350,63 @@ $I->seeUserPasswordDoesNotNeedRehash($user);
23192350
{% endhighlight %}
23202351

23212352

2353+
#### seeViolatedConstraint
2354+
2355+
* `param mixed` $subject
2356+
* `param ?string` $propertyPath
2357+
* `param ?string` $constraint
2358+
* `return void`
2359+
2360+
Asserts that the given subject passes validation.
2361+
2362+
This assertion does not concern the exact number of violations.
2363+
2364+
{% highlight php %}
2365+
2366+
<?php
2367+
$I->seeViolatedConstraint($subject);
2368+
$I->seeViolatedConstraint($subject, 'propertyName');
2369+
$I->seeViolatedConstraint($subject, 'propertyName', 'Symfony\Validator\ConstraintClass');
2370+
2371+
{% endhighlight %}
2372+
2373+
2374+
#### seeViolatedConstraintMessage
2375+
2376+
* `param string` $expected
2377+
* `param mixed` $subject
2378+
* `param string` $propertyPath
2379+
* `return void`
2380+
2381+
Asserts that a constraint violation message or a part of it is present in the subject's violations.
2382+
2383+
{% highlight php %}
2384+
2385+
<?php
2386+
$I->seeViolatedConstraintMessage('too short', $user, 'address');
2387+
2388+
{% endhighlight %}
2389+
2390+
2391+
#### seeViolatedConstraintsCount
2392+
2393+
* `param int` $expected
2394+
* `param mixed` $subject
2395+
* `param ?string` $propertyPath
2396+
* `param ?string` $constraint
2397+
* `return void`
2398+
2399+
Asserts the exact number of violations for the given subject.
2400+
2401+
{% highlight php %}
2402+
2403+
<?php
2404+
$I->seeViolatedConstraintsCount(3, $subject);
2405+
$I->seeViolatedConstraintsCount(2, $subject, 'propertyName');
2406+
2407+
{% endhighlight %}
2408+
2409+
23222410
#### selectOption
23232411

23242412
* `param ` $select

0 commit comments

Comments
 (0)