Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
24 | public function testAsMongoDate() |
||
25 | { |
||
26 | if (!extension_loaded('mongo')) return; |
||
27 | |||
28 | $ts1 = UniversalTimestamp::fromMongoDate(new \MongoDate()); |
||
29 | $md1 = $ts1->asMongoDate(); |
||
30 | |||
31 | $this->assertTrue($md1 instanceof \MongoDate); |
||
32 | $this->assertEquals($ts1->asSeconds(), $md1->sec); |
||
33 | $this->assertEquals($ts1->asMilliseconds()%1000, $md1->usec/1000); |
||
34 | } |
||
35 | } |
||
36 |
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.