Code Duplication    Length = 9-12 lines in 3 locations

Tests/Twig/DoctrineExtensionTest.php 3 locations

@@ 20-28 (lines=9) @@
17
18
class DoctrineExtensionTest extends \PHPUnit_Framework_TestCase
19
{
20
    public function testReplaceQueryParametersWithPostgresCasting()
21
    {
22
        $extension = new DoctrineExtension();
23
        $query = 'a=? OR (1)::string OR b=?';
24
        $parameters = array(1, 2);
25
26
        $result = $extension->replaceQueryParameters($query, $parameters);
27
        $this->assertEquals('a=1 OR (1)::string OR b=2', $result);
28
    }
29
30
    public function testReplaceQueryParametersWithStartingIndexAtOne()
31
    {
@@ 30-41 (lines=12) @@
27
        $this->assertEquals('a=1 OR (1)::string OR b=2', $result);
28
    }
29
30
    public function testReplaceQueryParametersWithStartingIndexAtOne()
31
    {
32
        $extension = new DoctrineExtension();
33
        $query = 'a=? OR b=?';
34
        $parameters = array(
35
            1 => 1,
36
            2 => 2
37
        );
38
39
        $result = $extension->replaceQueryParameters($query, $parameters);
40
        $this->assertEquals('a=1 OR b=2', $result);
41
    }
42
43
    public function testReplaceQueryParameters()
44
    {
@@ 43-54 (lines=12) @@
40
        $this->assertEquals('a=1 OR b=2', $result);
41
    }
42
43
    public function testReplaceQueryParameters()
44
    {
45
        $extension = new DoctrineExtension();
46
        $query = 'a=? OR b=?';
47
        $parameters = array(
48
            1,
49
            2
50
        );
51
52
        $result = $extension->replaceQueryParameters($query, $parameters);
53
        $this->assertEquals('a=1 OR b=2', $result);
54
    }
55
56
    public function testReplaceQueryParametersWithNamedIndex()
57
    {