mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-10-13 11:47:56 +03:00
@@ -16,4 +16,18 @@ class HelpersTest extends TestCase
|
||||
$result = baseUrl('http://example.com/bookstack/', true);
|
||||
$this->assertEquals('http://example.com/bookstack/', $result);
|
||||
}
|
||||
|
||||
public function test_base_url_force_domain_works_as_expected_with_full_url_given()
|
||||
{
|
||||
config()->set('app.url', 'http://example.com');
|
||||
$result = baseUrl('http://examps.com/books/test/page/cat', true);
|
||||
$this->assertEquals('http://example.com/books/test/page/cat', $result);
|
||||
}
|
||||
|
||||
public function test_base_url_force_domain_works_when_app_domain_is_same_as_given_url()
|
||||
{
|
||||
config()->set('app.url', 'http://example.com');
|
||||
$result = baseUrl('http://example.com/books/test/page/cat', true);
|
||||
$this->assertEquals('http://example.com/books/test/page/cat', $result);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user