Conditions | 1 |
Paths | 1 |
Total Lines | 23 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
48 | public function testConfigure() |
||
49 | { |
||
50 | // name & description |
||
51 | $name = 'test:command'; |
||
|
|||
52 | $description = 'The test command'; |
||
53 | |||
54 | // stub getCommandName |
||
55 | $this->command->expects($this->once()) |
||
56 | ->method('getCommandName') |
||
57 | ->will($this->returnValue($name)); |
||
58 | |||
59 | // stub getCommandDescription |
||
60 | $this->command->expects($this->once()) |
||
61 | ->method('getCommandDescription') |
||
62 | ->will($this->returnValue($description)); |
||
63 | |||
64 | // configure |
||
65 | $this->command->configure(); |
||
66 | |||
67 | // asert |
||
68 | $this->assertEquals($name, $this->command->getName()); |
||
69 | $this->assertEquals($description, $this->command->getDescription()); |
||
70 | } |
||
71 | } |
||
72 |
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.
To visualize
will produce issues in the first and second line, while this second example
will produce no issues.