1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2024-11-23 11:22:33 +01:00
BookStack/tests/TestCase.php

28 lines
770 B
PHP
Raw Normal View History

<?php namespace Tests;
2015-07-12 21:01:42 +02:00
use Illuminate\Foundation\Testing\DatabaseTransactions;
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
use Illuminate\Foundation\Testing\TestResponse;
abstract class TestCase extends BaseTestCase
2015-07-12 21:01:42 +02:00
{
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');
}
}