Conditions | 2 |
Paths | 2 |
Total Lines | 25 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
17 | public function testdisplay(){ |
||
18 | |||
19 | //error_reporting(E_ERROR | E_PARSE |E_ALL); |
||
20 | |||
21 | //execute the method with required child objects preset. it should return some html. |
||
22 | $view = new ViewPopup(); |
||
23 | $view->module = "Accounts"; |
||
24 | |||
25 | try{ |
||
26 | $view->bean = new Account(); |
||
27 | } |
||
28 | Catch(Exception $e){ |
||
29 | $this->assertStringStartsWith('mysqli_query()',$e->getMessage()); |
||
30 | } |
||
31 | |||
32 | ob_start(); |
||
33 | |||
34 | $view->display(); |
||
35 | |||
36 | $renderedContent = ob_get_contents(); |
||
37 | ob_end_clean(); |
||
38 | |||
39 | $this->assertGreaterThan(0,strlen($renderedContent)); |
||
40 | |||
41 | } |
||
42 | } |
||
44 |
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.