Completed
Push — master ( fd7370...afa46a )
by Joachim
04:42
created

TranslatorTraitTest::testGetter()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 13
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 7
nc 1
nop 0
1
<?php
2
3
namespace Loevgaard\DandomainAltapayBundle\Tests\Translation;
4
5
use Loevgaard\DandomainAltapayBundle\EventListener\ControllerListener;
6
use Loevgaard\DandomainAltapayBundle\EventListener\ResponseListener;
7
use Loevgaard\DandomainAltapayBundle\Http\TransactionLogger;
8
use Loevgaard\DandomainAltapayBundle\Tests\EventListener\Fixture\ControllerWithAnnotation;
9
use Loevgaard\DandomainAltapayBundle\Tests\Translation\Fixture\UsingTranslator;
10
use Loevgaard\DandomainAltapayBundle\Translation\TranslatorTrait;
11
use PHPUnit\Framework\TestCase;
12
use Doctrine\Common\Annotations\AnnotationReader;
13
use Symfony\Component\DependencyInjection\ContainerInterface;
14
use Symfony\Component\HttpFoundation\Request;
15
use Symfony\Component\HttpFoundation\Response;
16
use Symfony\Component\HttpKernel\Event\FilterControllerEvent;
17
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
18
use Symfony\Component\HttpKernel\HttpKernelInterface;
19
use Symfony\Component\Translation\IdentityTranslator;
20
21
class TranslatorTraitTest extends TestCase
22
{
23
    public function testGetter()
24
    {
25
        /** @var ContainerInterface|\PHPUnit_Framework_MockObject_MockObject $container */
26
        $container = $this->getMockBuilder(ContainerInterface::class)
27
            ->disableOriginalConstructor()
28
            ->getMock();
29
30
        $container->method('get')->willReturn(new IdentityTranslator());
31
32
        $obj = new UsingTranslator($container);
33
34
        $this->assertInstanceOf(IdentityTranslator::class, $obj->getIt());
35
    }
36
}
37