2018-11-10 12:30:59 +01:00
|
|
|
<?php
|
|
|
|
|
2019-01-20 10:41:58 +01:00
|
|
|
namespace Tests\Unit\Attribut;
|
2018-11-10 12:30:59 +01:00
|
|
|
|
2019-02-17 14:33:19 +01:00
|
|
|
use Infinito\Attribut\FullPersonNameSourceAttribut;
|
2020-04-02 21:13:35 +02:00
|
|
|
use Infinito\Attribut\FullPersonNameSourceAttributInterface;
|
|
|
|
use Infinito\Entity\Source\Complex\FullPersonNameSourceInterface;
|
|
|
|
use PHPUnit\Framework\TestCase;
|
2018-11-10 12:30:59 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @author kevinfrantz
|
|
|
|
*/
|
|
|
|
class FullPersonNameSourceAttributTest extends TestCase
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @var FullPersonNameSourceAttributInterface
|
|
|
|
*/
|
|
|
|
protected $fullname;
|
|
|
|
|
|
|
|
public function setUp(): void
|
|
|
|
{
|
|
|
|
$this->fullname = new class() implements FullPersonNameSourceAttributInterface {
|
|
|
|
use FullPersonNameSourceAttribut;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testConstructor(): void
|
|
|
|
{
|
|
|
|
$this->expectException(\TypeError::class);
|
|
|
|
$this->fullname->getFullPersonNameSource();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testAccessors(): void
|
|
|
|
{
|
|
|
|
$fullname = $this->createMock(FullPersonNameSourceInterface::class);
|
|
|
|
$this->assertNull($this->fullname->setFullPersonNameSource($fullname));
|
2018-11-10 13:09:18 +01:00
|
|
|
$this->assertEquals($fullname, $this->fullname->getFullPersonNameSource());
|
2018-11-10 12:30:59 +01:00
|
|
|
}
|
|
|
|
}
|