CorsServiceProviderTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 8
c 2
b 0
f 0
dl 0
loc 26
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testAssertCanBeRegistered() 0 5 1
A setup() 0 4 1
1
<?php
2
3
namespace Nord\Lumen\Cors\Tests;
4
5
use Nord\Lumen\Cors\CorsService;
6
use Nord\Lumen\Cors\CorsServiceProvider;
7
8
class CorsServiceProviderTest extends \Codeception\Test\Unit
9
{
10
    use \Codeception\Specify;
11
12
    /**
13
     * @var MockApplication
14
     */
15
    protected $app;
16
17
    /**
18
     * @inheritdoc
19
     */
20
    protected function setup(): void
21
    {
22
        $this->app = new MockApplication();
23
        $this->app->register(CorsServiceProvider::class);
24
    }
25
26
    /**
27
     *
28
     */
29
    public function testAssertCanBeRegistered()
30
    {
31
        $this->specify('verify serviceProvider is registered', function () {
32
            $service = $this->app->make(CorsService::class);
33
            verify($service)->isInstanceOf(CorsService::class);
34
        });
35
    }
36
}
37