Skip to content

Commit 9bad229

Browse files
committed
qa: remove data provider test cases that fail without strict mode
Per a comment from @simPod, removes the following: - From `RequestIntegrationTest::getInvalidMethod()`: - The test cases for 1 and 1.01 (integer and float) - From `ResponseIntegrationTest::getInvalidStatusCodeArguments()`: - The test cases for 200.34 Additionally, this patch adds keys to each entry returned by these two providers, to better facilitate understanding which test failed. The removals were necessary as the test case does not enable strict mode, and these particular types can be converted to the specified type "safely", leading to false negative results.
1 parent 545f294 commit 9bad229

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

src/RequestIntegrationTest.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,10 @@ public function testMethodWithInvalidArguments($method)
121121
public function getInvalidMethods()
122122
{
123123
return [
124-
[null],
125-
[1],
126-
[1.01],
127-
[false],
128-
[['foo']],
129-
[new \stdClass()],
124+
'null' => [null],
125+
'false' => [false],
126+
'array' => [['foo']],
127+
'object' => [new \stdClass()],
130128
];
131129
}
132130

src/ResponseIntegrationTest.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,11 @@ public function testStatusCodeInvalidArgument($statusCode)
8383
public function getInvalidStatusCodeArguments()
8484
{
8585
return [
86-
[true],
87-
['foobar'],
88-
[99],
89-
[600],
90-
[200.34],
91-
[new \stdClass()],
86+
'true' => [true],
87+
'string' => ['foobar'],
88+
'too-low' => [99],
89+
'too-high' => [600],
90+
'object' => [new \stdClass()],
9291
];
9392
}
9493

0 commit comments

Comments
 (0)