We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent df3fce0 commit 3ee71c4Copy full SHA for 3ee71c4
2 files changed
tests/Io/MiddlewareRunnerTest.php
@@ -80,6 +80,14 @@ public function provideProcessStackMiddlewares()
80
*/
81
public function testProcessStack(array $middlewares, $expectedCallCount)
82
{
83
+ // the ProcessStack middleware instances are stateful, so reset these
84
+ // before running the test, to not fail with --repeat=100
85
+ foreach ($middlewares as $middleware) {
86
+ if ($middleware instanceof ProcessStack) {
87
+ $middleware->reset();
88
+ }
89
90
+
91
$request = new ServerRequest('GET', 'https://example.com/');
92
$middlewareStack = new MiddlewareRunner($middlewares);
93
tests/Middleware/ProcessStack.php
@@ -25,4 +25,9 @@ public function getCallCount()
25
26
return $this->callCount;
27
}
28
29
+ public function reset()
30
+ {
31
+ $this->callCount = 0;
32
33
0 commit comments