Skip to content

Commit

Permalink
fix: change the namespace for the mock controllers.
Browse files Browse the repository at this point in the history
  • Loading branch information
ping-yee committed Oct 13, 2023
1 parent 3ef71de commit ec94928
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* the LICENSE file that was distributed with this source code.
*/

namespace CodeIgniter\Router\Controllers;
namespace App\Controllers;

use CodeIgniter\Controller;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* the LICENSE file that was distributed with this source code.
*/

namespace CodeIgniter\Router\Controllers\foo\bar\baz;
namespace App\Controllers\foo\bar\baz;

use CodeIgniter\Controller;

Expand Down
4 changes: 2 additions & 2 deletions tests/system/Router/RouteCollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1680,7 +1680,7 @@ public function testAutoRoutesControllerNameReturnsFQCN($namespace): void
$routes->setAutoRoute(true);
$routes->setDefaultNamespace($namespace);

copy(TESTPATH . 'system/Router/Controllers/Product.php', APPPATH . 'Controllers/Product.php');
copy(TESTPATH . 'system/Router/Controllers/App/Product.php', APPPATH . 'Controllers/Product.php');

$router = new Router($routes, Services::request());
$router->handle('/product');
Expand All @@ -1703,7 +1703,7 @@ public function testRoutesControllerNameReturnsFQCN($namespace): void
$routes->setDefaultNamespace($namespace);
$routes->get('/product', 'Product');

copy(TESTPATH . 'system/Router/Controllers/Product.php', APPPATH . 'Controllers/Product.php');
copy(TESTPATH . 'system/Router/Controllers/App/Product.php', APPPATH . 'Controllers/Product.php');

$router = new Router($routes, Services::request());
$router->handle('/product');
Expand Down

0 comments on commit ec94928

Please sign in to comment.