Code Duplication    Length = 7-7 lines in 2 locations

tests/Doctrine/Tests/DBAL/Functional/DataAccessTest.php 1 location

@@ 588-594 (lines=7) @@
585
        self::assertEquals(0, $row['locate9']);
586
    }
587
588
    public function testQuoteSQLInjection()
589
    {
590
        $sql  = "SELECT * FROM fetch_table WHERE test_string = " . $this->_conn->quote("bar' OR '1'='1");
591
        $rows = $this->_conn->fetchAll($sql);
592
593
        self::assertEquals(0, count($rows), "no result should be returned, otherwise SQL injection is possible");
594
    }
595
596
    /**
597
     * @group DDC-1213

tests/Doctrine/Tests/DBAL/Functional/WriteTest.php 1 location

@@ 40-46 (lines=7) @@
37
        self::assertTrue((bool) $this->_conn->fetchColumn($sql, array("text", 1111)));
38
    }
39
40
    public function testExecuteUpdate()
41
    {
42
        $sql      = "INSERT INTO write_table (test_int) VALUES ( " . $this->_conn->quote(1) . ")";
43
        $affected = $this->_conn->executeUpdate($sql);
44
45
        self::assertEquals(1, $affected, "executeUpdate() should return the number of affected rows!");
46
    }
47
48
    public function testExecuteUpdateWithTypes()
49
    {