Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit 30fe148

Browse files
committed
change try {} catch {} in test with expectException
1 parent 13f9c27 commit 30fe148

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

test/ApplicationTest.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,16 +131,14 @@ public function testPipeCanAcceptAPathArgument($middleware)
131131

132132
public function testPipeNonSlashPathOnNonStringPipeProduceTypeError()
133133
{
134+
$this->expectException(TypeError::class);
135+
134136
// @codingStandardsIgnoreStart
135137
$middleware1 = function ($request, $response) {};
136138
// @codingStandardsIgnoreEnd
137139
$middleware2 = $this->createMockMiddleware();
138140

139-
try {
140-
$this->app->pipe($middleware1, $middleware2);
141-
} catch (TypeError $t) {
142-
$this->assertInstanceOf(TypeError::class, $t);
143-
}
141+
$this->app->pipe($middleware1, $middleware2);
144142
}
145143

146144
/**

0 commit comments

Comments
 (0)