Skip to content

Commit b099977

Browse files
committed
Fix test
1 parent ceda671 commit b099977

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/Exercise/ThrowAnExpressionTest.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use PhpSchool\PHP8Appreciate\Exercise\ThrowAnExpression;
66
use PhpSchool\PhpWorkshop\Application;
7+
use PhpSchool\PhpWorkshop\Result\Cgi\GenericFailure;
78
use PhpSchool\PhpWorkshop\Result\Cgi\RequestFailure;
89
use PhpSchool\PhpWorkshop\Result\Cgi\Success;
910
use PhpSchool\PhpWorkshop\Result\Failure;
@@ -28,13 +29,13 @@ public function testThrowingWrongException(): void
2829
$this->assertVerifyWasNotSuccessful();
2930

3031
$output = $this->getOutputResult();
31-
32+
3233
self::assertInstanceOf(Success::class, $output->getResults()[0]);
33-
self::assertInstanceOf(RequestFailure::class, $output->getResults()[1]);
34+
self::assertInstanceOf(GenericFailure::class, $output->getResults()[1]);
3435

3536
self::assertMatchesRegularExpression(
36-
'/Fatal error: Uncaught Exception: Access denied!/',
37-
$output->getResults()[1]->getActualOutput()
37+
'/Fatal error: Uncaught Exception: Access denied!/',
38+
$output->getResults()[1]->getReason()
3839
);
3940

4041
$this->assertOutputWasIncorrect();

0 commit comments

Comments
 (0)