mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-08-26 20:22:18 +00:00
28 lines
770 B
PHP
28 lines
770 B
PHP
<?php namespace Tests;
|
|
|
|
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
|
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
|
|
use Illuminate\Foundation\Testing\TestResponse;
|
|
|
|
abstract class TestCase extends BaseTestCase
|
|
{
|
|
use CreatesApplication;
|
|
use DatabaseTransactions;
|
|
use SharedTestHelpers;
|
|
/**
|
|
* The base URL to use while testing the application.
|
|
* @var string
|
|
*/
|
|
protected $baseUrl = 'http://localhost';
|
|
|
|
/**
|
|
* Assert a permission error has occurred.
|
|
* @param TestResponse $response
|
|
*/
|
|
protected function assertPermissionError(TestResponse $response)
|
|
{
|
|
$response->assertRedirect('/');
|
|
$this->assertTrue(session()->has('error'));
|
|
session()->remove('error');
|
|
}
|
|
} |