mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 13:57:10 +02:00
Optimized for SPA
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Unit\Entity\Attribut;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use App\Entity\Attribut\PersonIdentitySourceAttributInterface;
|
||||
use App\Entity\Attribut\PersonIdentitySourceAttribut;
|
||||
use App\Entity\Source\Complex\PersonIdentitySourceInterface;
|
||||
|
||||
/**
|
||||
* @todo Implement abstract test class for entity attributs
|
||||
*
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
class PersonIdentitySourceAttributTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var PersonIdentitySourceAttributInterface
|
||||
*/
|
||||
protected $identity;
|
||||
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->identity = new class() implements PersonIdentitySourceAttributInterface {
|
||||
use PersonIdentitySourceAttribut;
|
||||
};
|
||||
}
|
||||
|
||||
public function testConstructor(): void
|
||||
{
|
||||
$this->expectException(\TypeError::class);
|
||||
$this->identity->getPersonIdentitySource();
|
||||
}
|
||||
|
||||
public function testAccessors(): void
|
||||
{
|
||||
$identity = $this->createMock(PersonIdentitySourceInterface::class);
|
||||
$this->assertNull($this->identity->setPersonIdentitySource($identity));
|
||||
$this->assertEquals($identity, $this->identity->getPersonIdentitySource());
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user