Passed
Push — main ( e110ad...47f0cd )
by Dylan
02:09
created

ModelTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 5
c 1
b 0
f 0
dl 0
loc 14
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A testGetService() 0 8 2
1
<?php
2
3
namespace Lifeboat\Tests\Models;
4
5
use Lifeboat\Client;
6
use Lifeboat\Factory\ClassMap;
7
use Lifeboat\Models\Model;
8
use Lifeboat\Services\ApiService;
9
use PHPUnit\Framework\TestCase;
10
11
class ModelTest extends TestCase {
12
13
    /**
14
     * @test
15
     * @covers \Lifeboat\Models\Model::getService
16
     */
17
    public function testGetService()
18
    {
19
        $client = new Client('mock', 'mock');
20
21
        /** @var Model $class */
22
        foreach (ClassMap::MODELS as $class) {
23
            $mock = new $class($client, ['ID' => 0]);
24
            $this->assertInstanceOf(ApiService::class, $mock->getService());
25
        }
26
    }
27
}
28