Skip to content

Commit e76da31

Browse files
committed
Update changelog and module docs
1 parent 203ffc0 commit e76da31

File tree

2 files changed

+178
-1
lines changed

2 files changed

+178
-1
lines changed

changelog.markdown

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ title: Codeception Changelog
88
# Changelog
99

1010

11+
#### 4.1.22
12+
13+
* Security fix: Disable deserialization of RunProcess class ([#6241](https://github.com/Codeception/Codeception/issues/6241))
14+
* Reduce memory consumption of very large tests ([#6230](https://github.com/Codeception/Codeception/issues/6230)) by **[esnelubov](https://github.com/esnelubov)**
15+
* Support guzzlehttp/psr7 v2 by **[W0rma](https://github.com/W0rma)**
16+
* Fix W3C warning in reports generated by Recorder extension ([#6224](https://github.com/Codeception/Codeception/issues/6224)) by RickR2H
17+
1118
#### 4.1.21
1219

1320
* Fix `dry-run` compatibility with symfony/console 5.3

docs/modules/Symfony.md

Lines changed: 171 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,139 @@ $I->amOnRoute('posts.show', ['id' => 34]);
302302
* `param array` $params
303303

304304

305+
#### assertEmailAddressContains
306+
307+
Verify that an email contains addresses with a [header](https://datatracker.ietf.org/doc/html/rfc4021)
308+
`$headerName` and its expected value `$expectedValue`.
309+
If the Email object is not specified, the last email sent is used instead.
310+
311+
{% highlight php %}
312+
313+
<?php
314+
$I->assertEmailAddressContains('To', 'jane_doe@example.com');
315+
316+
{% endhighlight %}
317+
318+
319+
#### assertEmailAttachmentCount
320+
321+
Verify that an email has sent the specified number `$count` of attachments.
322+
If the Email object is not specified, the last email sent is used instead.
323+
324+
{% highlight php %}
325+
326+
<?php
327+
$I->assertEmailAttachmentCount(1);
328+
329+
{% endhighlight %}
330+
331+
332+
#### assertEmailHasHeader
333+
334+
Verify that an email has a [header](https://datatracker.ietf.org/doc/html/rfc4021) `$headerName`.
335+
If the Email object is not specified, the last email sent is used instead.
336+
337+
{% highlight php %}
338+
339+
<?php
340+
$I->assertEmailHasHeader('Bcc');
341+
342+
{% endhighlight %}
343+
344+
345+
#### assertEmailHeaderNotSame
346+
347+
Verify that the [header](https://datatracker.ietf.org/doc/html/rfc4021)
348+
`$headerName` of an email is not the expected one `$expectedValue`.
349+
If the Email object is not specified, the last email sent is used instead.
350+
351+
{% highlight php %}
352+
353+
<?php
354+
$I->assertEmailHeaderNotSame('To', 'john_doe@gmail.com');
355+
356+
{% endhighlight %}
357+
358+
359+
#### assertEmailHeaderSame
360+
361+
Verify that the [header](https://datatracker.ietf.org/doc/html/rfc4021)
362+
`$headerName` of an email is the same as expected `$expectedValue`.
363+
If the Email object is not specified, the last email sent is used instead.
364+
365+
{% highlight php %}
366+
367+
<?php
368+
$I->assertEmailHeaderSame('To', 'jane_doe@gmail.com');
369+
370+
{% endhighlight %}
371+
372+
373+
#### assertEmailHtmlBodyContains
374+
375+
Verify that the HTML body of an email contains `$text`.
376+
If the Email object is not specified, the last email sent is used instead.
377+
378+
{% highlight php %}
379+
380+
<?php
381+
$I->assertEmailHtmlBodyContains('Successful registration');
382+
383+
{% endhighlight %}
384+
385+
386+
#### assertEmailHtmlBodyNotContains
387+
388+
Verify that the HTML body of an email does not contain a text `$text`.
389+
If the Email object is not specified, the last email sent is used instead.
390+
391+
{% highlight php %}
392+
393+
<?php
394+
$I->assertEmailHtmlBodyNotContains('userpassword');
395+
396+
{% endhighlight %}
397+
398+
399+
#### assertEmailNotHasHeader
400+
401+
Verify that an email does not have a [header](https://datatracker.ietf.org/doc/html/rfc4021) `$headerName`.
402+
If the Email object is not specified, the last email sent is used instead.
403+
404+
{% highlight php %}
405+
406+
<?php
407+
$I->assertEmailNotHasHeader('Bcc');
408+
409+
{% endhighlight %}
410+
411+
412+
#### assertEmailTextBodyContains
413+
414+
Verify the text body of an email contains a `$text`.
415+
If the Email object is not specified, the last email sent is used instead.
416+
417+
{% highlight php %}
418+
419+
<?php
420+
$I->assertEmailTextBodyContains('Example text body');
421+
422+
{% endhighlight %}
423+
424+
425+
#### assertEmailTextBodyNotContains
426+
427+
Verify that the text body of an email does not contain a `$text`.
428+
If the Email object is not specified, the last email sent is used instead.
429+
430+
{% highlight php %}
431+
432+
<?php
433+
$I->assertEmailTextBodyNotContains('My secret text body');
434+
435+
{% endhighlight %}
436+
437+
305438
#### attachFile
306439

307440
Attaches a file relative to the Codeception `_data` directory to the given file upload field.
@@ -802,6 +935,14 @@ $I->followRedirect();
802935

803936

804937

938+
#### goToLogoutPath
939+
940+
Go to the configured logout url (by default: `/logout`).
941+
This method includes redirection to the destination page configured after logout.
942+
943+
See the Symfony documentation on ['Logging Out'](https://symfony.com/doc/current/security.html#logging-out).
944+
945+
805946
#### grabAttributeFrom
806947

807948
Grabs the value of the given attribute value from the given element.
@@ -1073,7 +1214,7 @@ Invalidate previously cached routes.
10731214

10741215
#### logout
10751216

1076-
Invalidate the current session.
1217+
Alias method for [`logoutProgrammatically()`](https://codeception.com/docs/modules/Symfony#logoutProgrammatically)
10771218

10781219
{% highlight php %}
10791220

@@ -1083,6 +1224,19 @@ $I->logout();
10831224
{% endhighlight %}
10841225

10851226

1227+
#### logoutProgrammatically
1228+
1229+
Invalidates the current user's session and expires the session cookies.
1230+
This method does not include any redirects after logging out.
1231+
1232+
{% highlight php %}
1233+
1234+
<?php
1235+
$I->logoutProgrammatically();
1236+
1237+
{% endhighlight %}
1238+
1239+
10861240
#### makeHtmlSnapshot
10871241

10881242
Use this method within an [interactive pause](https://codeception.com/docs/02-GettingStarted#Interactive-Pause) to save the HTML source code of the current page.
@@ -1797,6 +1951,22 @@ $I->seeRenderedTemplate('layout.html.twig');
17971951
* `param string` $template
17981952

17991953

1954+
#### seeRequestTimeIsLessThan
1955+
1956+
Asserts that the time a request lasted is less than expected.
1957+
1958+
If the page performed a HTTP redirect, only the time of the last request will be taken into account.
1959+
You can modify this behavior using [stopFollowingRedirects()](https://codeception.com/docs/modules/Symfony#stopFollowingRedirects) first.
1960+
1961+
Also, note that using code coverage can significantly increase the time it takes to resolve a request,
1962+
which could lead to unreliable results when used together.
1963+
1964+
It is recommended to set [`rebootable_client`](https://codeception.com/docs/modules/Symfony#Config) to `true` (=default),
1965+
cause otherwise this assertion gives false results if you access multiple pages in a row, or if your app performs a redirect.
1966+
1967+
* `param int|float` $expectedMilliseconds The expected time in milliseconds
1968+
1969+
18001970
#### seeResponseCodeIs
18011971

18021972
Checks that response code is equal to value provided.

0 commit comments

Comments
 (0)