Testing cached routes
Closed this issue · 2 comments
bumbummen99 commented
- Testbench Version: 6.0.0
- Laravel Version: 8.1.0
- PHP Version: 7.4.0
- Database Driver & Version: -
Description:
I am sorry if this has already been clarified somewhere but is there any way to test cached routes? Doing something like:
$this->artisan('route:cache');
in my test does provoke the following error when calling getFreshApplicationRoutes in the command handle method:
CodeZero\LocalizedRoutes\Tests\Unit\UrlGeneratorTest::it_does_also_work_with_cached_routes ErrorException: require(/home/patrick/private/workspace/laravel-localized-routes/vendor/orchestra/testbench-core/laravel/bootstrap/app.php): failed to open stream: No such file or directory
Steps To Reproduce:
- Use route:cache in a test.
crynobone commented
You might need to build a custom command if you need that, not supported by Testbench.
ivanvermeyen commented
This seems to work: https://github.com/codezero-be/laravel-localized-routes/pull/31/files 👍