Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
17 | public function testConstructorNewOperatorRule() |
||
18 | { |
||
19 | $output = $this |
||
20 | ->runPhpmd('Service/UserConverter.php', 'symfony2.xml') |
||
21 | ->getOutput(); |
||
22 | |||
23 | $this->assertContains('Service/UserConverter.php:17 With a new operator in the constructor you have a strong dependency. Make your class flexible and inject the new instance via DI.', $output); |
||
24 | $this->assertNotContains('Service/UserConverter.php:20', $output); |
||
25 | $this->assertNotContains('Service/UserConverter.php:21', $output); |
||
26 | $this->assertNotContains('Service/UserConverter.php:29', $output); |
||
27 | } |
||
28 | |||
41 |