Code Duplication    Length = 14-14 lines in 2 locations

tests/Doctrine/Tests/DBAL/Functional/DataAccessTest.php 2 locations

@@ 261-274 (lines=14) @@
258
        $this->assertEquals('foo', $row['test_string']);
259
    }
260
261
    public function testFetchAssocWithTypes()
262
    {
263
        $datetimeString = '2010-01-01 10:10:10';
264
        $datetime = new \DateTime($datetimeString);
265
        $sql = "SELECT test_int, test_datetime FROM fetch_table WHERE test_int = ? AND test_datetime = ?";
266
        $row = $this->_conn->fetchAssoc($sql, array(1, $datetime), array(PDO::PARAM_STR, Type::DATETIME));
267
268
        $this->assertTrue($row !== false);
269
270
        $row = array_change_key_case($row, \CASE_LOWER);
271
272
        $this->assertEquals(1, $row['test_int']);
273
        $this->assertStringStartsWith($datetimeString, $row['test_datetime']);
274
    }
275
276
    /**
277
     * @expectedException \Doctrine\DBAL\DBALException
@@ 301-314 (lines=14) @@
298
        $this->assertEquals('foo', $row[1]);
299
    }
300
301
    public function testFetchArrayWithTypes()
302
    {
303
        $datetimeString = '2010-01-01 10:10:10';
304
        $datetime = new \DateTime($datetimeString);
305
        $sql = "SELECT test_int, test_datetime FROM fetch_table WHERE test_int = ? AND test_datetime = ?";
306
        $row = $this->_conn->fetchArray($sql, array(1, $datetime), array(PDO::PARAM_STR, Type::DATETIME));
307
308
        $this->assertTrue($row !== false);
309
310
        $row = array_change_key_case($row, \CASE_LOWER);
311
312
        $this->assertEquals(1, $row[0]);
313
        $this->assertStringStartsWith($datetimeString, $row[1]);
314
    }
315
316
    /**
317
     * @expectedException \Doctrine\DBAL\DBALException