Implemented test and interface for toString entity toString method

This commit is contained in:
Kevin Frantz 2018-10-31 22:25:01 +01:00
parent b3daf708ec
commit 269eb9fa3e
2 changed files with 11 additions and 0 deletions

View File

@ -10,4 +10,10 @@ use App\Entity\Attribut\IdAttributInterface;
*/
interface EntityInterface extends VersionAttributInterface, IdAttributInterface
{
/**
* Allows easier debuging.
*
* @return string
*/
public function __toString(): string;
}

View File

@ -39,4 +39,9 @@ class AbstractEntityTest extends TestCase
$this->assertNull($this->entity->setId($id));
$this->assertEquals($id, $this->entity->getId());
}
public function testToString(): void
{
$this->assertEquals(true, is_string($this->entity->__toString()));
}
}