mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 21:57:16 +02:00
Solved unit tests
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
namespace tests\unit\Entity\Source\Combination;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use App\Entity\Source\Data\PersonIdentitySourceInterface;
|
||||
use App\Entity\Source\Data\PersonIdentitySource;
|
||||
use App\Entity\Source\Combination\PersonIdentitySourceInterface;
|
||||
use App\Entity\Source\Combination\PersonIdentitySource;
|
||||
use App\Entity\Source\Combination\FullPersonNameSourceInterface;
|
||||
|
||||
class PersonIdentitySourceTest extends TestCase
|
||||
@@ -12,15 +12,22 @@ class PersonIdentitySourceTest extends TestCase
|
||||
/**
|
||||
* @var PersonIdentitySourceInterface
|
||||
*/
|
||||
public $identitySource;
|
||||
protected $identity;
|
||||
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->userSource = new PersonIdentitySource();
|
||||
$this->identity = new PersonIdentitySource();
|
||||
}
|
||||
|
||||
public function testConstructor(): void
|
||||
{
|
||||
$this->assertInstanceOf(FullPersonNameSourceInterface::class, $this->identitySource->getFullPersonNameSource());
|
||||
$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());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user