mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-01-09 22:17:26 +01:00
Implemented test and interface for toString entity toString method
This commit is contained in:
parent
b3daf708ec
commit
269eb9fa3e
@ -10,4 +10,10 @@ use App\Entity\Attribut\IdAttributInterface;
|
|||||||
*/
|
*/
|
||||||
interface EntityInterface extends VersionAttributInterface, IdAttributInterface
|
interface EntityInterface extends VersionAttributInterface, IdAttributInterface
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Allows easier debuging.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function __toString(): string;
|
||||||
}
|
}
|
||||||
|
@ -39,4 +39,9 @@ class AbstractEntityTest extends TestCase
|
|||||||
$this->assertNull($this->entity->setId($id));
|
$this->assertNull($this->entity->setId($id));
|
||||||
$this->assertEquals($id, $this->entity->getId());
|
$this->assertEquals($id, $this->entity->getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testToString(): void
|
||||||
|
{
|
||||||
|
$this->assertEquals(true, is_string($this->entity->__toString()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user