/** * @test */ public function getOne() { /** @var AbstractEntity $first */ $first = $this->entity->query()->getFirst(); if (!$first) { $this->fail(sprintf('No instances of %s found, cannot test', get_class($this->entity))); } /** @var AbstractEntity $entity */ $entity = $this->entity->getByUrl($first->getUrl()); $this->assertInstanceOf($this->getClassName(), $entity); }