mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-01-11 06:47:31 +01:00
26 lines
709 B
PHP
26 lines
709 B
PHP
|
<?php
|
||
|
|
||
|
namespace tests\Unit\Domain\RequestManagement\Entity;
|
||
|
|
||
|
use PHPUnit\Framework\TestCase;
|
||
|
use App\Domain\RequestManagement\Entity\RequestedEntity;
|
||
|
|
||
|
/**
|
||
|
* @author kevinfrantz
|
||
|
*/
|
||
|
class RequestedEntityTest extends TestCase
|
||
|
{
|
||
|
public function testSetByIdentity(): void
|
||
|
{
|
||
|
$requestedEntity = new RequestedEntity();
|
||
|
$slug = 'test';
|
||
|
$requestedEntity->setIdentity($slug);
|
||
|
$this->assertEquals($slug, $requestedEntity->getSlug());
|
||
|
$this->assertFalse($requestedEntity->hasId());
|
||
|
$id = 123;
|
||
|
$requestedEntity->setIdentity($id);
|
||
|
$this->assertEquals($id, $requestedEntity->getId());
|
||
|
$this->assertFalse($requestedEntity->hasSlug());
|
||
|
}
|
||
|
}
|