diff --git a/phpstan-baseline.php b/phpstan-baseline.php index 06beec2c3c34..0688da8c787e 100644 --- a/phpstan-baseline.php +++ b/phpstan-baseline.php @@ -16549,12 +16549,6 @@ 'count' => 2, 'path' => __DIR__ . '/tests/system/Router/RouteCollectionTest.php', ]; -$ignoreErrors[] = [ - // identifier: class.nameCase - 'message' => '#^Class CodeIgniter\\\\Controller referenced with incorrect case\\: CodeIgniter\\\\controller\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/tests/system/Router/RouteCollectionTest.php', -]; $ignoreErrors[] = [ // identifier: missingType.return 'message' => '#^Method CodeIgniter\\\\Router\\\\RouteCollectionTest\\:\\:getCollector\\(\\) has no return type specified\\.$#', diff --git a/tests/system/Router/RouteCollectionTest.php b/tests/system/Router/RouteCollectionTest.php index 5e398cfdf2a3..ddee083b3713 100644 --- a/tests/system/Router/RouteCollectionTest.php +++ b/tests/system/Router/RouteCollectionTest.php @@ -14,7 +14,7 @@ namespace CodeIgniter\Router; use App\Controllers\Product; -use CodeIgniter\controller; +use CodeIgniter\Controller; use CodeIgniter\Exceptions\PageNotFoundException; use CodeIgniter\HTTP\Method; use CodeIgniter\Test\CIUnitTestCase; @@ -243,10 +243,10 @@ public function testAddRecognizesCustomNamespaces(): void $routes = $this->getCollector(); $routes->setDefaultNamespace('\CodeIgniter'); - $routes->add('home', 'controller'); + $routes->add('home', 'Controller'); $expects = [ - 'home' => '\\' . controller::class, + 'home' => '\\' . Controller::class, ]; $routes = $routes->getRoutes();