- Was found that the test was not testing the actual situation anyway.
- A work-around in the request creation, within testing, just happened
to result in the desired outcome.
For reference: https://github.com/laravel/framework/pull/32345
class UrlTest extends TestCase
{
- public function test_request_url_takes_custom_url_into_account()
- {
- config()->set('app.url', 'http://example.com/bookstack');
- $this->get('/');
- $this->assertEquals('http://example.com/bookstack', request()->getUri());
-
- config()->set('app.url', 'http://example.com/docs/content');
- $this->get('/');
- $this->assertEquals('http://example.com/docs/content', request()->getUri());
- }
-
public function test_url_helper_takes_custom_url_into_account()
{
$this->runWithEnv('APP_URL', 'http://example.com/bookstack', function() {