mirror of
				https://github.com/kevinveenbirkenbach/infinito.git
				synced 2025-11-04 03:07:58 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			43 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			43 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
 | 
						|
namespace tests\unit\Entity\Source\Complex;
 | 
						|
 | 
						|
use PHPUnit\Framework\TestCase;
 | 
						|
use App\Entity\Source\Complex\FullPersonNameSourceInterface;
 | 
						|
use App\Entity\Source\Complex\FullPersonNameSource;
 | 
						|
use App\Entity\Source\Primitive\Name\SurnameSourceInterface;
 | 
						|
use App\Entity\Source\Primitive\Name\FirstNameSourceInterface;
 | 
						|
 | 
						|
class FullPersonNameSourceTest extends TestCase
 | 
						|
{
 | 
						|
    /**
 | 
						|
     * @var FullPersonNameSourceInterface
 | 
						|
     */
 | 
						|
    protected $name;
 | 
						|
 | 
						|
    public function setUp(): void
 | 
						|
    {
 | 
						|
        $this->name = new FullPersonNameSource();
 | 
						|
    }
 | 
						|
 | 
						|
    public function testConstructor(): void
 | 
						|
    {
 | 
						|
        $this->assertInstanceOf(SurnameSourceInterface::class, $this->name->getSurnameSource());
 | 
						|
        $this->assertInstanceOf(FirstNameSourceInterface::class, $this->name->getFirstNameSource());
 | 
						|
    }
 | 
						|
 | 
						|
    public function testFirstNameAccessor(): void
 | 
						|
    {
 | 
						|
        $name = $this->createMock(FirstNameSourceInterface::class);
 | 
						|
        $this->assertNull($this->name->setFirstNameSource($name));
 | 
						|
        $this->assertEquals($name, $this->name->getFirstNameSource());
 | 
						|
    }
 | 
						|
 | 
						|
    public function testSurnameAccessor(): void
 | 
						|
    {
 | 
						|
        $name = $this->createMock(SurnameSourceInterface::class);
 | 
						|
        $this->assertNull($this->name->setSurnameSource($name));
 | 
						|
        $this->assertEquals($name, $this->name->getSurnameSource());
 | 
						|
    }
 | 
						|
}
 |