Completed
Push — master ( 193d10...49cd13 )
by Mike
10:55
created

ServiceTest::testServiceProviderHint()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
1
<?php namespace GeneaLabs\LaravelCaffeine\Tests\Unit\Providers;
2
3
use Exception;
4
use GeneaLabs\LaravelCaffeine\Providers\Service;
5
use GeneaLabs\LaravelCaffeine\Tests\TestCase;
6
use Illuminate\Foundation\Testing\RefreshDatabase;
7
8
class ServiceTest extends TestCase
9
{
10
    public function testServiceProviderHint()
11
    {
12
        $expectedResult = ['genealabs-laravel-caffeine'];
13
        $actualResult = (new Service(app()))->provides();
1 ignored issue
show
Bug introduced by
app() of type Illuminate\Container\Container is incompatible with the type Illuminate\Contracts\Foundation\Application expected by parameter $app of GeneaLabs\LaravelCaffein...\Service::__construct(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

13
        $actualResult = (new Service(/** @scrutinizer ignore-type */ app()))->provides();
Loading history...
14
15
        $this->assertEquals($expectedResult, $actualResult);
16
    }
17
}
18