| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | public function testPdoIsNullOnErrorConnection() { |
||
| 11 | $dbConfig = [ |
||
| 12 | 'host' => 'localhost', |
||
| 13 | 'user' => 'no-name', |
||
| 14 | 'pass' => 'no-pass', |
||
| 15 | 'dbname' => 'database-doesnt-exist' |
||
| 16 | ]; |
||
| 17 | |||
| 18 | new Application(); |
||
| 19 | $db = new MySQL($dbConfig); |
||
| 20 | $this->assertNull($db->getPDO()); |
||
| 21 | } |
||
| 22 | |||
| 55 |
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.