Skip to content

Commit

Permalink
test: update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjis committed Jan 22, 2023
1 parent 41e626b commit 701bddd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion tests/_support/Controllers/Newautorouting.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

class Newautorouting extends Controller
{
public function getIndex()
public function getIndex(string $m = '')
{
return 'Hello';
}
Expand Down
2 changes: 1 addition & 1 deletion tests/system/Commands/RoutesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public function testRoutesCommandAutoRouteImproved()
| TRACE | testing | testing-index | \App\Controllers\TestController::index | | toolbar |
| CONNECT | testing | testing-index | \App\Controllers\TestController::index | | toolbar |
| CLI | testing | testing-index | \App\Controllers\TestController::index | | |
| GET(auto) | newautorouting | | \Tests\Support\Controllers\Newautorouting::getIndex | | toolbar |
| GET(auto) | newautorouting[/..] | | \Tests\Support\Controllers\Newautorouting::getIndex | | toolbar |
| POST(auto) | newautorouting/save/../..[/..] | | \Tests\Support\Controllers\Newautorouting::postSave | | toolbar |
+------------+--------------------------------+---------------+-----------------------------------------------------+----------------+---------------+
EOL;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function testGetFilterMatches()
$expected = [
0 => [
'GET(auto)',
'newautorouting',
'newautorouting[/..]',
'',
'\\Tests\\Support\\Controllers\\Newautorouting::getIndex',
'',
Expand Down Expand Up @@ -90,7 +90,7 @@ public function testGetFilterDoesNotMatch()
$expected = [
0 => [
'GET(auto)',
'newautorouting',
'newautorouting[/..]',
'',
'\\Tests\\Support\\Controllers\\Newautorouting::getIndex',
'',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,11 @@ public function testRead()
0 => [
'method' => 'get',
'route' => 'newautorouting',
'route_params' => '',
'route_params' => '[/..]',
'handler' => '\Tests\Support\Controllers\Newautorouting::getIndex',
'params' => [],
'params' => [
'm' => false,
],
],
[
'method' => 'post',
Expand Down

0 comments on commit 701bddd

Please sign in to comment.