mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-10-01 01:36:00 -04:00
Changed how the cache is mocked in status test
This commit is contained in:
parent
3df6c9ac05
commit
0dac9c68f0
@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Cache\ArrayStore;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
use Illuminate\Support\Facades\Cache;
|
use Illuminate\Support\Facades\Cache;
|
||||||
use Illuminate\Support\Facades\Session;
|
use Illuminate\Support\Facades\Session;
|
||||||
@ -31,7 +32,9 @@ class StatusTest extends TestCase
|
|||||||
|
|
||||||
public function test_returns_500_status_and_false_on_wrong_cache_return()
|
public function test_returns_500_status_and_false_on_wrong_cache_return()
|
||||||
{
|
{
|
||||||
Cache::partialMock()->shouldReceive('get')->andReturn('cat');
|
$mockStore = Mockery::mock(new ArrayStore())->makePartial();
|
||||||
|
Cache::swap($mockStore);
|
||||||
|
$mockStore->shouldReceive('get')->andReturn('cat');
|
||||||
|
|
||||||
$resp = $this->get("/status");
|
$resp = $this->get("/status");
|
||||||
$resp->assertStatus(500);
|
$resp->assertStatus(500);
|
||||||
|
Loading…
Reference in New Issue
Block a user