Completed
Push — develop ( 917ef4...9bd229 )
by Christoffer
11:11 queued 08:28
created

FractalServiceProviderTest::testAssertFacade()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace Nord\Lumen\Fractal\Tests;
4
5
use Nord\Lumen\Fractal\FractalFacade;
6
use Nord\Lumen\Fractal\FractalService;
7
use Nord\Lumen\Fractal\FractalServiceProvider;
8
9
class FractalServiceProviderTest extends \Codeception\Test\Unit
10
{
11
    use \Codeception\Specify;
12
13
    /**
14
     * @var MockApplication
15
     */
16
    protected $app;
17
18
    /**
19
     * @inheritdoc
20
     */
21
    protected function setup()
22
    {
23
        $this->app = new MockApplication();
24
        $this->app->withFacades();
25
        $this->app->register(FractalServiceProvider::class);
26
    }
27
28
    /**
29
     *
30
     */
31
    public function testAssertCanBeRegistered()
32
    {
33
        $this->specify('verify serviceProvider is registered', function () {
34
            $service = $this->app->make(FractalService::class);
35
            verify($service)->isInstanceOf(FractalService::class);
36
        });
37
    }
38
39
    /**
40
     *
41
     */
42
    public function testAssertFacade()
43
    {
44
        $this->specify('verify serviceProvider facade', function () {
45
            verify(FractalFacade::getFacadeRoot())->isInstanceOf(FractalService::class);
46
        });
47
    }
48
}
49