| Conditions | 1 |
| Paths | 1 |
| Total Lines | 15 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 23 | public function testRedirectToPage500() { |
||
| 24 | $dbConfig = [ |
||
| 25 | 'host' => 'localhost', |
||
| 26 | 'user' => 'no-name', |
||
| 27 | 'pass' => 'no-pass', |
||
| 28 | 'dbname' => 'database-doesnt-exist' |
||
| 29 | ]; |
||
| 30 | |||
| 31 | Url::instance()->setUrl('my-page/test'); |
||
| 32 | $app = new Application(); |
||
| 33 | $this->assertEquals($app->getPage(), 'my-page'); |
||
| 34 | |||
| 35 | new MySQL($dbConfig); |
||
| 36 | $this->assertEquals($app->getPage(), '503'); |
||
| 37 | } |
||
| 38 | |||
| 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.