Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | public function testFromMongoDate() |
||
10 | { |
||
11 | if (!extension_loaded('mongo')) return; |
||
12 | |||
13 | $uTs_A = UniversalTimestamp::now(); |
||
14 | $uTs_B = UniversalTimestamp::fromMongoDate(new \MongoDate()); |
||
15 | $uTs_C = UniversalTimestamp::now(); |
||
16 | |||
17 | $this->assertGreaterThanOrEqual(4, 5); |
||
18 | |||
19 | $this->assertGreaterThanOrEqual($uTs_A->asMilliseconds(), $uTs_B->asMilliseconds()); |
||
20 | $this->assertGreaterThanOrEqual($uTs_B->asMilliseconds(), $uTs_C->asMilliseconds()); |
||
21 | $this->assertGreaterThanOrEqual($uTs_A->asMilliseconds(), $uTs_C->asMilliseconds()); |
||
22 | } |
||
23 | |||
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.