Code Duplication    Length = 7-7 lines in 2 locations

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

@@ 40-46 (lines=7) @@
37
        $this->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
        $this->assertEquals(1, $affected, "executeUpdate() should return the number of affected rows!");
46
    }
47
48
    public function testExecuteUpdateWithTypes()
49
    {

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

@@ 581-587 (lines=7) @@
578
        $this->assertEquals(0, $row['locate9']);
579
    }
580
581
    public function testQuoteSQLInjection()
582
    {
583
        $sql = "SELECT * FROM fetch_table WHERE test_string = " . $this->_conn->quote("bar' OR '1'='1");
584
        $rows = $this->_conn->fetchAll($sql);
585
586
        $this->assertEquals(0, count($rows), "no result should be returned, otherwise SQL injection is possible");
587
    }
588
589
    /**
590
     * @group DDC-1213