ChainExtractorTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
dl 0
loc 17
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A testExtract() 0 13 1
1
<?php
2
3
namespace Incenteev\TranslationCheckerBundle\Tests\Translator\Extractor;
4
5
use Incenteev\TranslationCheckerBundle\Translator\Extractor\ChainExtractor;
6
use PHPUnit\Framework\TestCase;
7
use Prophecy\PhpUnit\ProphecyTrait;
8
9
class ChainExtractorTest extends TestCase
10
{
11
    use ProphecyTrait;
12
13
    public function testExtract()
14
    {
15
        $extractor1 = $this->prophesize('Incenteev\TranslationCheckerBundle\Translator\Extractor\ExtractorInterface');
16
        $extractor2 = $this->prophesize('Incenteev\TranslationCheckerBundle\Translator\Extractor\ExtractorInterface');
17
18
        $catalogue = $this->prophesize('Symfony\Component\Translation\MessageCatalogue');
19
20
        $extractor1->extract($catalogue)->shouldBeCalled();
21
        $extractor2->extract($catalogue)->shouldBeCalled();
22
23
        $extractor = new ChainExtractor(array($extractor1->reveal(), $extractor2->reveal()));
24
25
        $extractor->extract($catalogue->reveal());
26
    }
27
}
28