Skip to content

Commit 350a5a5

Browse files
committed
Updated changelog and module docs
1 parent a7f9069 commit 350a5a5

File tree

8 files changed

+343
-305
lines changed

8 files changed

+343
-305
lines changed

changelog.markdown

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

1010

1111

12+
### Codeception 5.0.9: 5.0.9
13+
14+
Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/11 14:42:09 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases)
15+
16+
17+
18+
* JUnitReporter: Do not set 'useless' testsuite attribute in strict mode [#6635](https://github.com/Codeception/Codeception/issues/6635) by **[gileri](https://github.com/gileri)**
19+
* Fixed static $defaultName deprecated in _completion command [#6633](https://github.com/Codeception/Codeception/issues/6633) by **[dmitryuk](https://github.com/dmitryuk)**
20+
* Replaced object property assertions removed from PHPUnit 10
21+
22+
23+
24+
### module-yii2 1.1.8: 1.1.8
25+
26+
Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/10 18:54:49 / [Repository](https://github.com/Codeception/module-yii2) / [Releases](https://github.com/Codeception/module-yii2/releases)
27+
28+
29+
30+
* Fix last commit error by **[sunnyphp](https://github.com/sunnyphp)** in https://github.com/Codeception/module-yii2/pull/73
31+
* update links by **[Arhell](https://github.com/Arhell)** in https://github.com/Codeception/module-yii2/pull/75
32+
* PHP 8.1: parse_str(): Passing null to parameter `[#1](https://github.com/Codeception/module-yii2/issues/1)` ($string) of type string is deprecated by **[uaoleg](https://github.com/uaoleg)** in https://github.com/Codeception/module-yii2/pull/80
33+
* Upgrade dependencies to support PHPUnit 10 by **[Naktibalda](https://github.com/Naktibalda)** in https://github.com/Codeception/module-yii2/pull/82
34+
35+
36+
37+
### lib-asserts 2.1.0: 2.1.0
38+
39+
Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/10 18:37:43 / [Repository](https://github.com/Codeception/lib-asserts) / [Releases](https://github.com/Codeception/lib-asserts/releases)
40+
41+
42+
43+
* Reimplement property assertions removed from PHPUnit 10 by **[Naktibalda](https://github.com/Naktibalda)** in https://github.com/Codeception/lib-asserts/pull/12
44+
* Use FQN in PHPDoc type hints for classes and interfaces by **[Sweetchuck](https://github.com/Sweetchuck)** in https://github.com/Codeception/lib-asserts/pull/11
45+
46+
47+
48+
49+
50+
### module-rest 3.3.2: 3.3.2
51+
52+
Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/09 18:16:01 / [Repository](https://github.com/Codeception/module-rest) / [Releases](https://github.com/Codeception/module-rest/releases)
53+
54+
55+
56+
* Reverted method signature changes accidentally released in 3.3.1
57+
58+
1259
### module-soap 3.0.1: 3.0.1
1360

1461
Released by [![](https://avatars.githubusercontent.com/u/395992?v=4&s=16) Naktibalda](https://github.com/Naktibalda) on 2023/02/09 07:08:01 / [Repository](https://github.com/Codeception/module-soap) / [Releases](https://github.com/Codeception/module-soap/releases)
@@ -1362,15 +1409,6 @@ Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) Tavo
13621409
* Update dependencies (https://github.com/Codeception/module-redis/pull/15)
13631410

13641411

1365-
### Codeception 4.1.25: 4.1.25
1366-
1367-
Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/21 01:58:17 / [Repository](https://github.com/Codeception/Codeception) / [Releases](https://github.com/Codeception/Codeception/releases)
1368-
1369-
1370-
1371-
* Update dependencies (https://github.com/Codeception/Codeception/pull/6296)
1372-
1373-
13741412
### module-asserts 2.0.1: 2.0.1
13751413

13761414
Released by [![](https://avatars.githubusercontent.com/u/64917965?v=4&s=16) TavoNiievez](https://github.com/TavoNiievez) on 2021/12/18 17:11:54 / [Repository](https://github.com/Codeception/module-asserts) / [Releases](https://github.com/Codeception/module-asserts/releases)

composer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@
4646
"config": {
4747
"platform": {
4848
"ext-phalcon": "4.1.1"
49+
},
50+
"allow-plugins": {
51+
"php-http/discovery": true
4952
}
5053
}
5154
}

docs/modules/Asserts.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Special module for using asserts in your tests.
3939
#### assertArrayHasKey
4040

4141
* `param int|string` $key
42-
* `param array|ArrayAccess` $array
42+
* `param array|\ArrayAccess` $array
4343
* `param string` $message
4444

4545
Asserts that an array has a specified key.
@@ -48,7 +48,7 @@ Asserts that an array has a specified key.
4848
#### assertArrayNotHasKey
4949

5050
* `param int|string` $key
51-
* `param array|ArrayAccess` $array
51+
* `param array|\ArrayAccess` $array
5252
* `param string` $message
5353

5454
Asserts that an array does not have a specified key.
@@ -128,7 +128,7 @@ Asserts that a haystack contains only instances of a given class name.
128128
#### assertCount
129129

130130
* `param int` $expectedCount
131-
* `param Countable|iterable` $haystack
131+
* `param \Countable|iterable` $haystack
132132
* `param string` $message
133133

134134
Asserts the number of elements of an array, Countable or Traversable.
@@ -773,7 +773,7 @@ Asserts that a haystack does not contain only values of a given type.
773773
#### assertNotCount
774774

775775
* `param int` $expectedCount
776-
* `param Countable|iterable` $haystack
776+
* `param \Countable|iterable` $haystack
777777
* `param string` $message
778778

779779
Asserts the number of elements of an array, Countable or Traversable.
@@ -869,8 +869,8 @@ Asserts that two variables do not have the same type and value.
869869

870870
#### assertNotSameSize
871871

872-
* `param Countable|iterable` $expected
873-
* `param Countable|iterable` $actual
872+
* `param \Countable|iterable` $expected
873+
* `param \Countable|iterable` $actual
874874
* `param string` $message
875875

876876
Assert that the size of two arrays (or `Countable` or `Traversable` objects) is not the same.
@@ -930,8 +930,8 @@ Asserts that two variables have the same type and value.
930930

931931
#### assertSameSize
932932

933-
* `param Countable|iterable` $expected
934-
* `param Countable|iterable` $actual
933+
* `param \Countable|iterable` $expected
934+
* `param \Countable|iterable` $actual
935935
* `param string` $message
936936

937937
Assert that the size of two arrays (or `Countable` or `Traversable` objects) is the same.
@@ -1138,16 +1138,16 @@ Asserts that two XML files are not equal.
11381138
#### assertXmlStringEqualsXmlFile
11391139

11401140
* `param string` $expectedFile
1141-
* `param DOMDocument|string` $actualXml
1141+
* `param \DOMDocument|string` $actualXml
11421142
* `param string` $message
11431143

11441144
Asserts that two XML documents are equal.
11451145

11461146

11471147
#### assertXmlStringEqualsXmlString
11481148

1149-
* `param DOMDocument|string` $expectedXml
1150-
* `param DOMDocument|string` $actualXml
1149+
* `param \DOMDocument|string` $expectedXml
1150+
* `param \DOMDocument|string` $actualXml
11511151
* `param string` $message
11521152

11531153
Asserts that two XML documents are equal.
@@ -1156,16 +1156,16 @@ Asserts that two XML documents are equal.
11561156
#### assertXmlStringNotEqualsXmlFile
11571157

11581158
* `param string` $expectedFile
1159-
* `param DOMDocument|string` $actualXml
1159+
* `param \DOMDocument|string` $actualXml
11601160
* `param string` $message
11611161

11621162
Asserts that two XML documents are not equal.
11631163

11641164

11651165
#### assertXmlStringNotEqualsXmlString
11661166

1167-
* `param DOMDocument|string` $expectedXml
1168-
* `param DOMDocument|string` $actualXml
1167+
* `param \DOMDocument|string` $expectedXml
1168+
* `param \DOMDocument|string` $actualXml
11691169
* `param string` $message
11701170

11711171
Asserts that two XML documents are not equal.

docs/modules/REST.md

Lines changed: 26 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ Here's an [Online JSONPath Expressions Tester](https://jsonpath.curiousconcept.c
9393

9494
Conflicts with SOAP module
9595

96+
9697
### Actions
9798

9899
#### amAWSAuthenticated
@@ -101,7 +102,7 @@ Conflicts with SOAP module
101102
* `throws ConfigurationException`
102103
* `return void`
103104

104-
Allows sending REST request using AWS Authorization
105+
Allows to send REST request using AWS Authorization
105106

106107
Only works with PhpBrowser
107108
Example Config:
@@ -188,7 +189,7 @@ $I->amNTLMAuthenticated('jon_snow', 'targaryen');
188189
* `param string` $name the name of the header to delete.
189190
* `return void`
190191

191-
Deletes an HTTP header (that was originally added by [haveHttpHeader()](#haveHttpHeader)),
192+
Deletes a HTTP header (that was originally added by [haveHttpHeader()](#haveHttpHeader)),
192193
so that subsequent requests will not send it anymore.
193194

194195
Example:
@@ -325,11 +326,13 @@ Checks XML response does not equal to provided XML.
325326

326327
Comparison is done by canonicalizing both xml`s.
327328

329+
Parameter can be passed either as XmlBuilder, DOMDocument, DOMNode, XML string, or array (if no attributes).
330+
328331

329332
#### dontSeeXmlResponseIncludes
330333

331334
* `part` xml
332-
* `param \DOMNode|\Codeception\Util\XmlBuilder|array|string` $xml
335+
* `param mixed` $xml
333336
* `return void`
334337

335338
Checks XML response does not include provided XML.
@@ -394,7 +397,7 @@ $I->sendPut('/user', array('id' => $firstUserId[0], 'name' => 'davert'));
394397
* `part` xml
395398
* `param string` $name
396399
* `param bool` $first Whether to return the first value or all header values
397-
* `return string|array|null` The first header value if $first is true, an array of values otherwise
400+
* `return string|array` The first header value if $first is true, an array of values otherwise
398401

399402
Returns the value of the specified header name
400403

@@ -421,7 +424,7 @@ $I->sendPut('/user', array('id' => $user_id, 'name' => 'davert'));
421424
#### grabTextContentFromXmlElement
422425

423426
* `part` xml
424-
* `param string` $cssOrXPath
427+
* `param mixed` $cssOrXPath
425428
* `return string`
426429

427430
Finds and returns text contents of element.
@@ -437,7 +440,7 @@ Element is matched by either CSS or XPath
437440
* `param string` $value
438441
* `return void`
439442

440-
Sets na HTTP header to be used for all subsequent requests. Use [`deleteHeader`](#deleteHeader) to unset it.
443+
Sets a HTTP header to be used for all subsequent requests. Use [`deleteHeader`](#deleteHeader) to unset it.
441444

442445
{% highlight php %}
443446

@@ -527,7 +530,7 @@ its value, asserting that are there
527530
Checks that http response header is received only once.
528531

529532
HTTP RFC2616 allows multiple response headers with the same name.
530-
You can check that you didn't accidentally send the same header twice.
533+
You can check that you didn't accidentally sent the same header twice.
531534

532535
{% highlight php %}
533536

@@ -620,16 +623,16 @@ Examples:
620623
{% highlight php %}
621624

622625
<?php
623-
// response: {"name": "john", "email": "john@gmail.com"}
624-
$I->seeResponseContainsJson(['name' => 'john']);
626+
// response: {name: john, email: john@gmail.com}
627+
$I->seeResponseContainsJson(array('name' => 'john'));
625628

626-
// response {"user": "john", "profile": {"email": "john@gmail.com"}}
627-
$I->seeResponseContainsJson(['email' => 'john@gmail.com']);
629+
// response {user: john, profile: { email: john@gmail.com }}
630+
$I->seeResponseContainsJson(array('email' => 'john@gmail.com'));
628631

629632

630633
{% endhighlight %}
631634

632-
This method recursively checks if one array can be found inside another.
635+
This method recursively checks if one array can be found inside of another.
633636

634637

635638
#### seeResponseEquals
@@ -919,13 +922,13 @@ This is how filters can be used:
919922
{% highlight php %}
920923

921924
<?php
922-
// {"user_id": 1, "email" => "davert@codeception.com"}
925+
// {'user_id': 1, 'email' => 'davert@codeception.com'}
923926
$I->seeResponseMatchesJsonType([
924927
'user_id' => 'string:>0:<1000', // multiple filters can be used
925928
'email' => 'string:regex(~\@~)' // we just check that @ char is included
926929
]);
927930

928-
// {"user_id"'": "1"}
931+
// {'user_id': '1'}
929932
$I->seeResponseMatchesJsonType([
930933
'user_id' => 'string:>0', // works with strings as well
931934
]);
@@ -939,18 +942,20 @@ See [JsonType reference](https://codeception.com/docs/reference/JsonType).
939942
#### seeXmlResponseEquals
940943

941944
* `part` xml
942-
* `param \DOMDocument|string` $xml
945+
* `param mixed` $xml
943946
* `return void`
944947

945948
Checks XML response equals provided XML.
946949

947950
Comparison is done by canonicalizing both xml`s.
948951

952+
Parameters can be passed either as DOMDocument, DOMNode, XML string, or array (if no attributes).
953+
949954

950955
#### seeXmlResponseIncludes
951956

952957
* `part` xml
953-
* `param \DOMNode|\Codeception\Util\XmlBuilder|array|string` $xml
958+
* `param mixed` $xml
954959
* `return void`
955960

956961
Checks XML response includes provided XML.
@@ -990,9 +995,8 @@ $I->seeXmlResponseMatchesXpath('//root/user[@id=1]');
990995
* `part` xml
991996
* `param string` $method
992997
* `param string` $url
993-
* `param \ArrayAccess|\JsonSerializable|array|string` $params
998+
* `param array|string|JsonSerializable` $params
994999
* `param array` $files
995-
* `return ?string`
9961000

9971001
Sends a HTTP request.
9981002

@@ -1002,9 +1006,8 @@ Sends a HTTP request.
10021006
* `part` json
10031007
* `part` xml
10041008
* `param string` $url
1005-
* `param \ArrayAccess|\JsonSerializable|array|string` $params
1009+
* `param array` $params
10061010
* `param array` $files
1007-
* `return ?string`
10081011

10091012
Sends DELETE request to given uri.
10101013

@@ -1022,7 +1025,6 @@ $I->sendDelete('/message/1');
10221025
* `part` xml
10231026
* `param string` $url
10241027
* `param array` $params
1025-
* `return ?string`
10261028

10271029
Sends a GET request to given uri.
10281030

@@ -1043,7 +1045,6 @@ $I->sendGet('/orders', ['id' => 1])
10431045
* `part` xml
10441046
* `param string` $url
10451047
* `param array` $params
1046-
* `return ?string`
10471048

10481049
Sends a HEAD request to given uri.
10491050

@@ -1077,9 +1078,8 @@ Sends an OPTIONS request to given uri.
10771078
* `part` json
10781079
* `part` xml
10791080
* `param string` $url
1080-
* `param \ArrayAccess|\JsonSerializable|array|string` $params
1081+
* `param array|string|JsonSerializable` $params
10811082
* `param array` $files
1082-
* `return ?string`
10831083

10841084
Sends PATCH request to given uri.
10851085

@@ -1098,11 +1098,10 @@ $response = $I->sendPatch('/message/1', ['subject' => 'Read this!']);
10981098
* `see` https://php.net/manual/en/features.file-upload.post-method.php
10991099
* `see` codecept_data_dir()
11001100
* `param string` $url
1101-
* `param \ArrayAccess|\JsonSerializable|array|string` $params
1101+
* `param array|string|JsonSerializable` $params
11021102
* `param array` $files A list of filenames or "mocks" of $_FILES (each entry being an array with the following
11031103
keys: name, type, error, size, tmp_name (pointing to the real file path). Each key works
11041104
as the "name" attribute of a file input field.
1105-
* `return ?string`
11061105

11071106
Sends a POST request to given uri. Parameters and files can be provided separately.
11081107

@@ -1139,9 +1138,8 @@ $I->sendPost('/add-task', ['form' => [
11391138
* `part` json
11401139
* `part` xml
11411140
* `param string` $url
1142-
* `param \ArrayAccess|\JsonSerializable|array|string` $params
1141+
* `param array|string|JsonSerializable` $params
11431142
* `param array` $files
1144-
* `return ?string`
11451143

11461144
Sends PUT request to given uri.
11471145

0 commit comments

Comments
 (0)