Conditions | 1 |
Paths | 1 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
7 | public function testConstructorAcceptsDocument() |
||
8 | { |
||
9 | $document = DMSDocument::create(array('Title' => 'Test')); |
||
10 | $document->write(); |
||
11 | |||
12 | // Ensure it's empty by default |
||
13 | $this->assertNull(DMSRequestItem::create()->getDocument()); |
||
14 | |||
15 | // It can be set in the constructor |
||
16 | $requestItem = DMSRequestItem::create($document); |
||
17 | $this->assertEquals($document->ID, $requestItem->getDocument()->ID); |
||
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.