| Conditions | 1 |
| Paths | 1 |
| Total Lines | 9 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 4 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 35 | public function testMerge() |
||
| 36 | { |
||
| 37 | $mc = MergeCommand::getInstance(); |
||
| 38 | $branch = $this->getRepository()->getBranch('test'); |
||
| 39 | $this->assertEquals("merge 'refs/heads/test'", $mc->merge($branch)); |
||
|
|
|||
| 40 | $this->assertEquals("merge '-m' 'test msg' 'refs/heads/test'", $mc->merge($branch, "test msg")); |
||
| 41 | $this->assertEquals("merge '--ff-only' '-m' 'test msg' 'refs/heads/test'", $mc->merge($branch, "test msg", array('--ff-only'))); |
||
| 42 | $this->assertEquals("merge '--no-ff' '-m' 'test msg' 'refs/heads/test'", $mc->merge($branch, "test msg", array('--no-ff'))); |
||
| 43 | } |
||
| 44 | |||
| 56 |
Unless you are absolutely sure that the expression can never be null because of other conditions, we strongly recommend to add an additional type check to your code: