| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | public function testResultDataMergeData() |
||
| 32 | { |
||
| 33 | $a = new ResultData(ResultData::EXITCODE_OK, '', ['one' => 'first', 'two' => 'second']); |
||
| 34 | |||
| 35 | $to_be_merged = [ |
||
| 36 | ['one' => 'ignored',], |
||
| 37 | ['three' => 'new',], |
||
| 38 | ]; |
||
| 39 | |||
| 40 | foreach ($to_be_merged as $mergeThis) { |
||
| 41 | $a->mergeData($mergeThis); |
||
| 42 | } |
||
| 43 | |||
| 44 | $expected = ['one' => 'first', 'two' => 'second', 'three' => 'new']; |
||
| 45 | $this->guy->assertEquals($expected, $a->getData()); |
||
| 46 | } |
||
| 47 | } |
||
| 48 |
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.