Bug: Can't test redirect()->route('routename'), while redirect()->to('path') is working with ControllerTester #2676
Labels
bug
Verified issues on the current code behavior or pull requests that will fix them
Describe the bug
For example, I have a controller function
Home::index
that redirect to route "product-index":On Test part, I create test with:
and it got error:
If I change the code with
redirect()->to(base_url('product'))
.It working:
vendor/bin/phpunit tests/Controller/HomeTest.php PHPUnit 8.5.2 by Sebastian Bergmann and contributors. . 1 / 1 (100%) Time: 258 ms, Memory: 12.00 MB OK (1 test, 1 assertion)
CodeIgniter 4 version
4.0.2
Expected behavior, and steps to reproduce if appropriate
Working with
redirect()->route()
Context
The text was updated successfully, but these errors were encountered: