Skip to content

Commit

Permalink
Merge pull request #771 from driehle/fix/broken-tests
Browse files Browse the repository at this point in the history
Fixed broken test cases occuring with laminas-test 3.8.0
  • Loading branch information
driehle authored Feb 3, 2022
2 parents 10f14c8 + c167352 commit 0844e03
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"laminas/laminas-mvc-console": "^1.3.0",
"laminas/laminas-serializer": "^2.11.0",
"laminas/laminas-session": "^2.12.0",
"laminas/laminas-test": "^3.5.1",
"laminas/laminas-test": "^3.8.0",
"phpspec/prophecy-phpunit": "^2.0.1",
"phpstan/phpstan": "^1.1.2",
"phpstan/phpstan-phpunit": "^1.0.0",
Expand Down
9 changes: 3 additions & 6 deletions tests/Controller/CliControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ protected function setUp(): void
*/
public function testIndexActionCanBeAccessed(): void
{
/** @phpstan-ignore-next-line */
$this->dispatch(new Request(['scriptname.php', 'list']));
$this->dispatch((string) (new Request(['scriptname.php', 'list'])));

$this->assertResponseStatusCode(0);
$this->assertModuleName('doctrinemodule');
Expand All @@ -53,16 +52,14 @@ public function testIndexActionCanBeAccessed(): void

public function testNonZeroExitCode(): void
{
/** @phpstan-ignore-next-line */
$this->dispatch(new Request(['scriptname.php', 'fail']));
$this->dispatch((string) (new Request(['scriptname.php', 'fail'])));

$this->assertNotResponseStatusCode(0);
}

public function testException(): void
{
/** @phpstan-ignore-next-line */
$this->dispatch(new Request(['scriptname.php', '-q', 'fail', '--exception']));
$this->dispatch((string) (new Request(['scriptname.php', '-q', 'fail', '--exception'])));

$this->assertNotResponseStatusCode(0);
}
Expand Down

0 comments on commit 0844e03

Please sign in to comment.