Completed
Push — master ( 375a11...881166 )
by Nicolas
14:02
created

Tests/Integration/BlockFacadeTest.php (1 issue)

Labels
Severity

Upgrade to new PHP Analysis Engine

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
There is at least one abstract method in this class. Maybe declare it as abstract, or implement the remaining methods: artisan, be, call, seed
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