We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8a327a5 commit 29ce0d4Copy full SHA for 29ce0d4
1 file changed
tests/AppTest.php
@@ -324,10 +324,16 @@ public function testAllowRouteOverrides()
324
echo 'Hello first';
325
});
326
327
- $this->expectException(Exception::class);
328
- App::get('/')->action(function () {
329
- echo 'Hello second';
330
- });
+ try {
+ App::get('/')->action(function () {
+ echo 'Hello second';
+ });
331
+ $this->fail('Failed to throw exception');
332
+ } catch (Exception $e) {
333
+ // Threw exception as expected
334
+ $this->assertEquals('Route for (GET:) already registered.', $e->getMessage());
335
+
336
+ }
337
338
// Test success
339
App::setAllowOverride(true);
0 commit comments