]> BookStack Code Mirror - bookstack/blob - tests/Unit/UrlTest.php
Applied StyleCI changes, added php/larastan to attribution
[bookstack] / tests / Unit / UrlTest.php
1 <?php
2
3 namespace Tests\Unit;
4
5 use Tests\TestCase;
6
7 class UrlTest extends TestCase
8 {
9     public function test_url_helper_takes_custom_url_into_account()
10     {
11         $this->runWithEnv('APP_URL', 'http://example.com/bookstack', function () {
12             $this->assertEquals('http://example.com/bookstack/books', url('/books'));
13         });
14     }
15
16     public function test_url_helper_sets_correct_scheme_even_when_request_scheme_is_different()
17     {
18         $this->runWithEnv('APP_URL', 'https://example.com/', function () {
19             $this->get('http://example.com/login')->assertSee('https://example.com/dist/styles.css');
20         });
21     }
22 }
Morty Proxy This is a proxified and sanitized view of the page, visit original site.