Passed
Push — bugfix/doc-block-resolver-awar... ( cb0e15 )
by Chema
25:44
created

DocBlockResolverAwareTest::test_existing_service()   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
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 6
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GacelaTest\Integration\Framework\DocBlockResolverAware;
6
7
use PHPUnit\Framework\TestCase;
8
9
final class DocBlockResolverAwareTest extends TestCase
10
{
11
    public function test_existing_service(): void
12
    {
13
        $dummy = new DummyDocBlockResolverAware();
14
        $actual = $dummy->getRepository()->findName();
15
16
        self::assertSame('name', $actual);
17
    }
18
19
    public function test_non_existing_service(): void
20
    {
21
        $this->expectExceptionMessage('Missing the concrete return type for the method `getRepository()`');
22
23
        $dummy = new BadDummyDocBlockResolverAware();
24
        $dummy->getRepository();
25
    }
26
}
27