Passed
Pull Request — master (#20)
by Christophe
03:13
created

ChainExtractorTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 15
rs 10
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
8
class ChainExtractorTest extends TestCase
9
{
10
    public function testExtract()
11
    {
12
        $extractor1 = $this->prophesize('Incenteev\TranslationCheckerBundle\Translator\Extractor\ExtractorInterface');
13
        $extractor2 = $this->prophesize('Incenteev\TranslationCheckerBundle\Translator\Extractor\ExtractorInterface');
14
15
        $catalogue = $this->prophesize('Symfony\Component\Translation\MessageCatalogue');
16
17
        $extractor1->extract($catalogue)->shouldBeCalled();
18
        $extractor2->extract($catalogue)->shouldBeCalled();
19
20
        $extractor = new ChainExtractor(array($extractor1->reveal(), $extractor2->reveal()));
21
22
        $extractor->extract($catalogue->reveal());
23
    }
24
}
25