| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | public function testGetPackageInfo() |
||
| 8 | { |
||
| 9 | $loader = new ComposerLoader(__DIR__); |
||
| 10 | $processor = new UpdatePackageInfo; |
||
| 11 | $output = $processor->getPackageInfo($loader->getLock()->packages); |
||
| 12 | $this->assertTrue(is_array($output)); |
||
| 13 | $this->assertCount(1, $output); |
||
| 14 | $this->assertArrayHasKey('Name', $output[0]); |
||
| 15 | $this->assertArrayHasKey('Description', $output[0]); |
||
| 16 | $this->assertArrayHasKey('Version', $output[0]); |
||
| 17 | $this->assertEquals('fake/package', $output[0]['Name']); |
||
| 18 | } |
||
| 19 | } |
||
| 20 |
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.