]> BookStack Code Mirror - bookstack/blob - tests/TestCase.php
French translation update
[bookstack] / tests / TestCase.php
1 <?php namespace Tests;
2
3 use Illuminate\Foundation\Testing\DatabaseTransactions;
4 use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
5 use Illuminate\Foundation\Testing\TestResponse;
6
7 abstract class TestCase extends BaseTestCase
8 {
9     use CreatesApplication;
10     use DatabaseTransactions;
11     use SharedTestHelpers;
12     /**
13      * The base URL to use while testing the application.
14      * @var string
15      */
16     protected $baseUrl = 'http://localhost';
17
18     /**
19      * Assert a permission error has occurred.
20      * @param TestResponse $response
21      */
22     protected function assertPermissionError(TestResponse $response)
23     {
24         $response->assertRedirect('/');
25         $this->assertTrue(session()->has('error'));
26         session()->remove('error');
27     }
28 }
Morty Proxy This is a proxified and sanitized view of the page, visit original site.