Code Duplication    Length = 13-14 lines in 2 locations

tests/Doctrine/Tests/ORM/Query/LanguageRecognitionTest.php 2 locations

@@ 26-38 (lines=13) @@
23
        $this->em = $this->getTestEntityManager();
24
    }
25
26
    public function assertValidDQL($dql, $debug = false)
27
    {
28
        try {
29
            $parserResult = $this->parseDql($dql);
30
            $this->addToAssertionCount(1);
31
        } catch (QueryException $e) {
32
            if ($debug) {
33
                echo $e->getTraceAsString() . PHP_EOL;
34
            }
35
36
            $this->fail($e->getMessage());
37
        }
38
    }
39
40
    public function assertInvalidDQL($dql, $debug = false)
41
    {
@@ 40-53 (lines=14) @@
37
        }
38
    }
39
40
    public function assertInvalidDQL($dql, $debug = false)
41
    {
42
        try {
43
            $parserResult = $this->parseDql($dql);
44
45
            $this->fail('No syntax errors were detected, when syntax errors were expected');
46
        } catch (QueryException $e) {
47
            if ($debug) {
48
                echo $e->getMessage() . PHP_EOL;
49
                echo $e->getTraceAsString() . PHP_EOL;
50
            }
51
            $this->addToAssertionCount(1);
52
        }
53
    }
54
55
    public function parseDql($dql, $hints = [])
56
    {