abstract class UnexistingRouteTestClass extends BaseRouterUnitTestClass
10
{
11
12
/**
13
* Testing default unexisting route handler
14
*/
15
public function testUnexistingRouteException(): void
16
{
17
// setup
18
$_SERVER['REQUEST_METHOD'] = 'GET';
19
$router = $this->getRouter();
20
$router->addGetRoute('r1', $this, 'r1');
21
$router->addPostRoute('r1', $this, 'r1');
22
23
// assertions
24
$this->expectException(\Exception::class);
25
$this->expectExceptionCode(- 1);
26
$this->expectErrorMessage('The processor was not found for the route unexisting in GET : r1, ; POST : r1, ; PUT : <none>; DELETE : <none>; OPTION : <none>; PATCH : <none>');