Skip to content

Commit aa93ae2

Browse files
committed
test: add feature test for auto routing legacy
1 parent 98239ad commit aa93ae2

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

tests/system/Test/FeatureTestTraitTest.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@
1111

1212
namespace CodeIgniter\Test;
1313

14+
use CodeIgniter\Config\Factories;
1415
use CodeIgniter\Events\Events;
1516
use CodeIgniter\Exceptions\PageNotFoundException;
1617
use CodeIgniter\HTTP\Response;
18+
use Config\Routing;
1719
use Config\Services;
1820

1921
/**
@@ -616,4 +618,15 @@ public function testSetupRequestBodyWithBody(): void
616618

617619
$this->assertSame('test', $request->getBody());
618620
}
621+
622+
public function testAutoRoutingLegacy()
623+
{
624+
$config = config(Routing::class);
625+
$config->autoRoute = true;
626+
Factories::injectMock('config', Routing::class, $config);
627+
628+
$response = $this->get('home/index');
629+
630+
$response->assertOK();
631+
}
619632
}

0 commit comments

Comments
 (0)