| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 10 |
| Ratio | 100 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 5 | View Code Duplication | public function testLastInsertedId() |
|
| 6 | { |
||
| 7 | $this->assertEquals(0, $this->bridge->insertId()); |
||
| 8 | |||
| 9 | $this->bridge->query('INSERT INTO test_table VALUES (100, "test insert")'); |
||
| 10 | $this->assertEquals(100, $this->bridge->insertId()); |
||
| 11 | |||
| 12 | $this->bridge->query('INSERT INTO test_table (testfield) VALUES ("test insert")'); |
||
| 13 | $this->assertEquals(101, $this->bridge->insertId()); |
||
| 14 | } |
||
| 15 | } |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.