infinito/application/tests/Unit/Entity/Source/Complex/PersonIdentitySourceTest.php

34 lines
950 B
PHP
Raw Normal View History

2018-11-10 13:09:18 +01:00
<?php
2018-11-21 17:55:48 +01:00
namespace tests\unit\Entity\Source\Complex;
2018-11-10 13:09:18 +01:00
use PHPUnit\Framework\TestCase;
2018-11-21 17:55:48 +01:00
use App\Entity\Source\Complex\PersonIdentitySourceInterface;
use App\Entity\Source\Complex\PersonIdentitySource;
use App\Entity\Source\Complex\FullPersonNameSourceInterface;
2018-11-10 13:09:18 +01:00
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
}
}