1 | <?php |
||
2 | |||
3 | namespace NStack\Laravel\Tests; |
||
4 | |||
5 | use Illuminate\Support\Facades\Storage; |
||
6 | use NStack\Config; |
||
7 | use NStack\NStack; |
||
8 | |||
9 | class TestCase extends \PHPUnit\Framework\TestCase |
||
10 | { |
||
11 | protected function mockStorage() |
||
12 | { |
||
13 | Storage::extend('mock', function () { |
||
14 | return \Mockery::mock(\Illuminate\Contracts\Filesystem\Filesystem::class); |
||
15 | }); |
||
16 | |||
17 | Config::set('filesystems.disks.mock', ['driver' => 'mock']); |
||
18 | Config::set('filesystems.default', 'mock'); |
||
19 | |||
20 | return Storage::disk(); |
||
21 | } |
||
22 | |||
23 | protected function mockNstack() |
||
24 | { |
||
25 | return new NStack() |
||
26 | } |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
27 | } |
||
28 |