Skip to content

Commit 8ac5198

Browse files
committed
test: fix incorrect test
1 parent 255fbe5 commit 8ac5198

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

tests/system/Router/RouteCollectionTest.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace CodeIgniter\Router;
1313

14-
use App\Controllers\Home;
1514
use CodeIgniter\Config\Services;
1615
use CodeIgniter\Test\CIUnitTestCase;
1716
use Config\Modules;
@@ -1489,12 +1488,12 @@ public function testRouteOverwritingTwoRules()
14891488
$routes->setDefaultController('Home');
14901489
$routes->setDefaultMethod('index');
14911490

1491+
// The subdomain of the current URL is `doc`, so this route is registered.
14921492
$routes->get('/', '\App\Controllers\Site\CDoc::index', ['subdomain' => 'doc', 'as' => 'doc_index']);
1493+
// The subdomain route is already registered, so this route is not registered.
14931494
$routes->get('/', 'Home::index');
14941495

1495-
// the second rule applies, so overwrites the first
1496-
$expects = '\\' . Home::class;
1497-
1496+
$expects = '\App\Controllers\Site\CDoc';
14981497
$this->assertSame($expects, $router->handle('/'));
14991498
}
15001499

0 commit comments

Comments
 (0)