Completed
Push — master ( a987b1...959bb2 )
by Andrii
02:27
created

SaleRepositoryTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 3
dl 0
loc 10
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getRepo() 0 3 1
A testDI() 0 3 1
1
<?php
2
3
namespace hiqdev\billing\hiapi\tests\unit\sale;
4
5
use hiqdev\php\billing\sale\Sale;
6
use hiqdev\billing\hiapi\sale\SaleRepository;
7
use hiqdev\yii\DataMapper\tests\unit\BaseRepositoryTest;
8
9
class SaleRepositoryTest extends BaseRepositoryTest
10
{
11
    public function testDI()
12
    {
13
        $this->assertInstanceOf(SaleRepository::class, $this->getRepo());
14
    }
15
16
    protected function getRepo(): SaleRepository
17
    {
18
        return $this->getRepository(Sale::class);
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getReposit...lling\sale\Sale::class) returns the type hiqdev\yii\DataMapper\repositories\BaseRepository which includes types incompatible with the type-hinted return hiqdev\billing\hiapi\sale\SaleRepository.
Loading history...
19
    }
20
}
21