Added draft for Identity and Names

This commit is contained in:
Kevin Frantz committed 2018-11-10 17:25:48 +01:00
1 parent a06422a1c4
commit 7a6a5e1bcf
15 files changed
+129 -15

No files matched your search

@@ -0,0 +1,30 @@
<?php
namespace tests\unit\Entity\Source\Data;
use PHPUnit\Framework\TestCase;
use App\Entity\Source\Data\IdentityInterface;
use App\Entity\Source\Data\IdentitySource;
use App\Entity\Source\Data\FullPersonNameSourceInterface;
class IdentitySourceTest extends TestCase
{
/**
* @var IdentityInterface
*/
protected $identity;
public function setUp():void{
$this->identity = new IdentitySource();
}
public function testConstructor():void{
$this->assertInstanceOf(FullPersonNameSourceInterface::class, $this->identity->getName());
}
public function testName():void{
$name = $this->createMock(FullPersonNameSourceInterface::class);
$this->assertNull($this->identity->setName($name));
$this->assertEquals($name, $this->identity->getName());
}
}