Code Duplication    Length = 10-13 lines in 2 locations

vendor/symfony/yaml/Tests/Command/LintCommandTest.php 2 locations

@@ 29-38 (lines=10) @@
26
{
27
    private $files;
28
29
    public function testLintCorrectFile()
30
    {
31
        $tester = $this->createCommandTester();
32
        $filename = $this->createFile('foo: bar');
33
34
        $ret = $tester->execute(array('filename' => $filename), array('verbosity' => OutputInterface::VERBOSITY_VERBOSE, 'decorated' => false));
35
36
        $this->assertEquals(0, $ret, 'Returns 0 in case of success');
37
        $this->assertRegExp('/^\/\/ OK in /', trim($tester->getDisplay()));
38
    }
39
40
    public function testLintIncorrectFile()
41
    {
@@ 40-52 (lines=13) @@
37
        $this->assertRegExp('/^\/\/ OK in /', trim($tester->getDisplay()));
38
    }
39
40
    public function testLintIncorrectFile()
41
    {
42
        $incorrectContent = '
43
foo:
44
bar';
45
        $tester = $this->createCommandTester();
46
        $filename = $this->createFile($incorrectContent);
47
48
        $ret = $tester->execute(array('filename' => $filename), array('decorated' => false));
49
50
        $this->assertEquals(1, $ret, 'Returns 1 in case of error');
51
        $this->assertContains('Unable to parse at line 3 (near "bar").', trim($tester->getDisplay()));
52
    }
53
54
    public function testConstantAsKey()
55
    {