These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | namespace Modules\Block\Tests\Integration; |
||
4 | |||
5 | use Illuminate\Database\Eloquent\Collection; |
||
6 | |||
7 | class BlockFacadeTest extends BaseBlockTest |
||
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
8 | { |
||
9 | /** @test */ |
||
10 | public function it_links_global_facade_to_repository() |
||
11 | { |
||
12 | $this->block->create(['name' => 'testBlock', 'en' => ['body' => 'lorem en'], 'fr' => ['body' => 'lorem fr']]); |
||
13 | |||
14 | $this->assertInstanceOf(Collection::class, \Block::all()); |
||
15 | } |
||
16 | |||
17 | /** @test */ |
||
18 | public function it_works_as_repository() |
||
19 | { |
||
20 | $this->block->create([ |
||
21 | 'name' => 'test-block', |
||
22 | 'en' => [ |
||
23 | 'body' => 'lorem en', |
||
24 | 'online' => true, |
||
25 | ], |
||
26 | 'fr' => [ |
||
27 | 'body' => 'lorem fr', |
||
28 | 'online' => true, |
||
29 | ], |
||
30 | ]); |
||
31 | |||
32 | $this->assertEquals('lorem en', \Block::get('test-block')); |
||
33 | } |
||
34 | } |
||
35 |