mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-08-27 04:32:14 +00:00
![Dan Brown](/assets/img/avatar_default.png)
Fixes #956 & #1048 Also added tests to cover this url logic. Also removed debugbar during tests to maybe improve test speed.
19 lines
605 B
PHP
19 lines
605 B
PHP
<?php namespace Tests;
|
|
|
|
class HelpersTest extends TestCase
|
|
{
|
|
|
|
public function test_base_url_takes_config_into_account()
|
|
{
|
|
config()->set('app.url', 'http://example.com/bookstack');
|
|
$result = baseUrl('/');
|
|
$this->assertEquals('http://example.com/bookstack/', $result);
|
|
}
|
|
|
|
public function test_base_url_takes_extra_path_into_account_on_forced_domain()
|
|
{
|
|
config()->set('app.url', 'http://example.com/bookstack');
|
|
$result = baseUrl('http://example.com/bookstack/', true);
|
|
$this->assertEquals('http://example.com/bookstack/', $result);
|
|
}
|
|
} |