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

CustomRepositoryTest::testCustomRepository()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 12
c 0
b 0
f 0
rs 9.4285
cc 1
eloc 6
nc 1
nop 0
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