Skip to content

Commit

Permalink
test: fix tests that rector broke
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjis committed Apr 20, 2022
1 parent d2bdf44 commit 5fd2ddb
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions tests/system/Router/AutoRouterImprovedTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function testAutoRouteFindsDefaultControllerAndMethodGet()
= $router->getRoute('/');

$this->assertNull($directory);
$this->assertSame(Index::class, $controller);
$this->assertSame('\\' . Index::class, $controller);
$this->assertSame('getIndex', $method);
$this->assertSame([], $params);
}
Expand All @@ -73,7 +73,7 @@ public function testAutoRouteFindsDefaultControllerAndMethodPost()
= $router->getRoute('/');

$this->assertNull($directory);
$this->assertSame(Index::class, $controller);
$this->assertSame('\\' . Index::class, $controller);
$this->assertSame('postIndex', $method);
$this->assertSame([], $params);
}
Expand All @@ -86,7 +86,7 @@ public function testAutoRouteFindsControllerWithFileAndMethod()
= $router->getRoute('mycontroller/somemethod');

$this->assertNull($directory);
$this->assertSame(Mycontroller::class, $controller);
$this->assertSame('\\' . Mycontroller::class, $controller);
$this->assertSame('getSomemethod', $method);
$this->assertSame([], $params);
}
Expand All @@ -99,7 +99,7 @@ public function testFindsControllerAndMethodAndParam()
= $router->getRoute('mycontroller/somemethod/a');

$this->assertNull($directory);
$this->assertSame(Mycontroller::class, $controller);
$this->assertSame('\\' . Mycontroller::class, $controller);
$this->assertSame('getSomemethod', $method);
$this->assertSame(['a'], $params);
}
Expand All @@ -124,7 +124,7 @@ public function testAutoRouteFindsControllerWithFile()
= $router->getRoute('mycontroller');

$this->assertNull($directory);
$this->assertSame(Mycontroller::class, $controller);
$this->assertSame('\\' . Mycontroller::class, $controller);
$this->assertSame('getIndex', $method);
$this->assertSame([], $params);
}
Expand All @@ -137,7 +137,7 @@ public function testAutoRouteFindsControllerWithSubfolder()
= $router->getRoute('subfolder/mycontroller/somemethod');

$this->assertSame('Subfolder/', $directory);
$this->assertSame(\CodeIgniter\Router\Controllers\Subfolder\Mycontroller::class, $controller);
$this->assertSame('\\' . \CodeIgniter\Router\Controllers\Subfolder\Mycontroller::class, $controller);
$this->assertSame('getSomemethod', $method);
$this->assertSame([], $params);
}
Expand All @@ -151,7 +151,7 @@ public function testAutoRouteFindsDashedSubfolder()

$this->assertSame('Dash_folder/', $directory);
$this->assertSame(
\CodeIgniter\Router\Controllers\Dash_folder\Mycontroller::class,
'\\' . \CodeIgniter\Router\Controllers\Dash_folder\Mycontroller::class,
$controller
);
$this->assertSame('getSomemethod', $method);
Expand All @@ -166,7 +166,7 @@ public function testAutoRouteFindsDashedController()
= $router->getRoute('dash-folder/dash-controller/somemethod');

$this->assertSame('Dash_folder/', $directory);
$this->assertSame(Dash_controller::class, $controller);
$this->assertSame('\\' . Dash_controller::class, $controller);
$this->assertSame('getSomemethod', $method);
$this->assertSame([], $params);
}
Expand All @@ -179,7 +179,7 @@ public function testAutoRouteFindsDashedMethod()
= $router->getRoute('dash-folder/dash-controller/dash-method');

$this->assertSame('Dash_folder/', $directory);
$this->assertSame(Dash_controller::class, $controller);
$this->assertSame('\\' . Dash_controller::class, $controller);
$this->assertSame('getDash_method', $method);
$this->assertSame([], $params);
}
Expand All @@ -192,7 +192,7 @@ public function testAutoRouteFindsDefaultDashFolder()
= $router->getRoute('dash-folder');

$this->assertSame('Dash_folder/', $directory);
$this->assertSame(Home::class, $controller);
$this->assertSame('\\' . Home::class, $controller);
$this->assertSame('getIndex', $method);
$this->assertSame([], $params);
}
Expand Down

0 comments on commit 5fd2ddb

Please sign in to comment.