Completed
Pull Request — master (#14)
by Pavel
04:24
created

CustomRepositoryTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Importance

Changes 0
Metric Value
dl 0
loc 15
c 0
b 0
f 0
wmc 1
lcom 1
cbo 4
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A testCustomRepository() 0 12 1
1
<?php
2
3
namespace Bankiru\Api\Doctrine\Tests;
4
5
use Bankiru\Api\Doctrine\Test\Entity\CustomEntity;
6
use Bankiru\Api\Doctrine\Test\Repository\CustomTestRepository;
7
8
class CustomRepositoryTest extends AbstractEntityManagerTest
9
{
10
    public function testCustomRepository()
11
    {
12
        /** @var CustomTestRepository $repository */
13
        $repository = $this->getManager()->getRepository(CustomEntity::class);
14
        $this->getClient()->push($this->getResponseMock(true, (object)['customField' => 'custom-response']));
15
16
        /** @var \StdClass $data */
17
        $data = $repository->doCustomStuff();
18
19
        self::assertInstanceOf(\stdClass::class, $data);
20
        self::assertEquals('custom-response', $data->customField);
21
    }
22
}
23