Code Duplication    Length = 8-8 lines in 5 locations

tests/Functional/Visitor/Twig/TranslationFilterTest.php 1 location

@@ 18-25 (lines=8) @@
15
16
class TranslationFilterTest extends BaseTwigVisitorTest
17
{
18
    public function testExtract()
19
    {
20
        $collection = $this->getSourceLocations(new TranslationFilter(), 'Twig/TranslationFilter/trans.html.twig');
21
22
        $this->assertCount(1, $collection);
23
        $source = $collection->first();
24
        $this->assertEquals('foobar', $source->getMessage());
25
    }
26
}
27

tests/Functional/Visitor/Twig/TranslationBlockTest.php 1 location

@@ 36-43 (lines=8) @@
33
        $this->assertEquals('messages', $source->getContext()['domain']);
34
    }
35
36
    public function testTranschoice()
37
    {
38
        $collection = $this->getSourceLocations(new TranslationBlock(), 'Twig/TranslationBlock/transchoice.html.twig');
39
40
        $this->assertCount(1, $collection);
41
        $source = $collection->first();
42
        $this->assertEquals('foobar', $source->getMessage());
43
    }
44
}
45

tests/Functional/BladeTest.php 3 locations

@@ 29-36 (lines=8) @@
26
    }
27
28
29
    public function testExtractLang()
30
    {
31
        $collection = $this->getSourceLocations('Blade/lang.blade.php');
32
33
        $this->assertCount(1, $collection);
34
        $source = $collection->first();
35
        $this->assertEquals('foo.bar', $source->getMessage());
36
    }
37
38
    public function testExtractTrans()
39
    {
@@ 38-45 (lines=8) @@
35
        $this->assertEquals('foo.bar', $source->getMessage());
36
    }
37
38
    public function testExtractTrans()
39
    {
40
        $collection = $this->getSourceLocations('Blade/trans.blade.php');
41
42
        $this->assertCount(1, $collection);
43
        $source = $collection->first();
44
        $this->assertEquals('foo.bar', $source->getMessage());
45
    }
46
47
    public function testExtractTransChoice()
48
    {
@@ 47-54 (lines=8) @@
44
        $this->assertEquals('foo.bar', $source->getMessage());
45
    }
46
47
    public function testExtractTransChoice()
48
    {
49
        $collection = $this->getSourceLocations('Blade/trans_choice.blade.php');
50
51
        $this->assertCount(1, $collection);
52
        $source = $collection->first();
53
        $this->assertEquals('foo.bar', $source->getMessage());
54
    }
55
}
56