| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | public function testEntity() |
||
| 8 | { |
||
| 9 | $entity = new SearchIndexEntity(); |
||
| 10 | self::assertTrue($entity->isNew()); |
||
| 11 | $entity->objectType = mt_rand(0, 100);$entity->cacheId = mt_rand(0, 100);$entity->hash = mt_rand(0, 100);$entity->count = mt_rand(0, 100); |
||
| 12 | $newEntity = new SearchIndexEntity(); |
||
| 13 | $newEntity->fromArray($entity->toArray()); |
||
| 14 | |||
| 15 | self::assertEquals($entity, $newEntity); |
||
| 16 | self::assertFalse($entity->isNew()); |
||
| 17 | } |
||
| 18 | } |
||
| 19 |
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.