2018-11-10 13:09:18 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace tests\unit\Entity\Source\Combination;
|
|
|
|
|
|
|
|
use PHPUnit\Framework\TestCase;
|
2018-11-15 20:30:34 +01:00
|
|
|
use App\Entity\Source\Combination\PersonIdentitySourceInterface;
|
|
|
|
use App\Entity\Source\Combination\PersonIdentitySource;
|
2018-11-10 13:09:18 +01:00
|
|
|
use App\Entity\Source\Combination\FullPersonNameSourceInterface;
|
|
|
|
|
|
|
|
class PersonIdentitySourceTest extends TestCase
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @var PersonIdentitySourceInterface
|
|
|
|
*/
|
2018-11-15 20:30:34 +01:00
|
|
|
protected $identity;
|
2018-11-10 13:09:18 +01:00
|
|
|
|
|
|
|
public function setUp(): void
|
|
|
|
{
|
2018-11-15 20:30:34 +01:00
|
|
|
$this->identity = new PersonIdentitySource();
|
2018-11-10 13:09:18 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public function testConstructor(): void
|
|
|
|
{
|
2018-11-15 20:30:34 +01:00
|
|
|
$this->assertInstanceOf(FullPersonNameSourceInterface::class, $this->identity->getFullPersonNameSource());
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testFullName(): void
|
|
|
|
{
|
|
|
|
$name = $this->createMock(FullPersonNameSourceInterface::class);
|
|
|
|
$this->assertNull($this->identity->setFullPersonNameSource($name));
|
|
|
|
$this->assertEquals($name, $this->identity->getFullPersonNameSource());
|
2018-11-10 13:09:18 +01:00
|
|
|
}
|
|
|
|
}
|