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

DocBlockResolverAwareTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 7
c 2
b 0
f 0
dl 0
loc 16
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A test_non_existing_service() 0 6 1
A test_existing_service() 0 6 1
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