Code Duplication    Length = 8-8 lines in 5 locations

tests/Functional/BladeTest.php 3 locations

@@ 40-47 (lines=8) @@
37
        return $collection;
38
    }
39
40
    public function testExtractLang()
41
    {
42
        $collection = $this->getSourceLocations('Blade/lang.blade.php');
43
44
        $this->assertCount(1, $collection);
45
        $source = $collection->first();
46
        $this->assertEquals('foo.bar', $source->getMessage());
47
    }
48
49
    public function testExtractTrans()
50
    {
@@ 49-56 (lines=8) @@
46
        $this->assertEquals('foo.bar', $source->getMessage());
47
    }
48
49
    public function testExtractTrans()
50
    {
51
        $collection = $this->getSourceLocations('Blade/trans.blade.php');
52
53
        $this->assertCount(1, $collection);
54
        $source = $collection->first();
55
        $this->assertEquals('foo.bar', $source->getMessage());
56
    }
57
58
    public function testExtractTransChoice()
59
    {
@@ 58-65 (lines=8) @@
55
        $this->assertEquals('foo.bar', $source->getMessage());
56
    }
57
58
    public function testExtractTransChoice()
59
    {
60
        $collection = $this->getSourceLocations('Blade/trans_choice.blade.php');
61
62
        $this->assertCount(1, $collection);
63
        $source = $collection->first();
64
        $this->assertEquals('foo.bar', $source->getMessage());
65
    }
66
}
67

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

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

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

@@ 22-29 (lines=8) @@
19
 */
20
final class TranslationFilterTest extends BaseTwigVisitorTest
21
{
22
    public function testExtract()
23
    {
24
        $collection = $this->getSourceLocations(TwigVisitor::create(), 'Twig/TranslationFilter/trans.html.twig');
25
26
        $this->assertCount(1, $collection);
27
        $source = $collection->first();
28
        $this->assertEquals('foobar', $source->getMessage());
29
    }
30
}
31