mirror of
				https://github.com/kevinveenbirkenbach/infinito.git
				synced 2025-11-03 18:58:01 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			40 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			40 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
 | 
						|
namespace Tests\Unit\Attribut;
 | 
						|
 | 
						|
use PHPUnit\Framework\TestCase;
 | 
						|
use Infinito\Attribut\RequestedEntityAttribut;
 | 
						|
use Infinito\Attribut\RequestedEntityAttributInterface;
 | 
						|
use Infinito\Domain\RequestManagement\Entity\RequestedEntityInterface;
 | 
						|
 | 
						|
/**
 | 
						|
 * @author kevinfrantz
 | 
						|
 */
 | 
						|
class RequestedEntityAttributTest extends TestCase
 | 
						|
{
 | 
						|
    /**
 | 
						|
     * @var RequestedEntityAttributInterface
 | 
						|
     */
 | 
						|
    protected $requestedEntityAttribut;
 | 
						|
 | 
						|
    public function setUp(): void
 | 
						|
    {
 | 
						|
        $this->requestedEntityAttribut = new class() implements RequestedEntityAttributInterface {
 | 
						|
            use RequestedEntityAttribut;
 | 
						|
        };
 | 
						|
    }
 | 
						|
 | 
						|
    public function testConstructor(): void
 | 
						|
    {
 | 
						|
        $this->expectException(\TypeError::class);
 | 
						|
        $this->requestedEntityAttribut->getRequestedEntity();
 | 
						|
    }
 | 
						|
 | 
						|
    public function testAccessors(): void
 | 
						|
    {
 | 
						|
        $requestedEntity = $this->createMock(RequestedEntityInterface::class);
 | 
						|
        $this->assertNull($this->requestedEntityAttribut->setRequestedEntity($requestedEntity));
 | 
						|
        $this->assertEquals($requestedEntity, $this->requestedEntityAttribut->getRequestedEntity());
 | 
						|
    }
 | 
						|
}
 |