mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-01-10 22:37:28 +01:00
40 lines
1.1 KiB
PHP
40 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace Tests\Unit\Attribut;
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
use App\Domain\RequestManagement\Right\RequestedRightInterface;
|
|
use App\Attribut\RequestedRightAttributInterface;
|
|
use App\Attribut\RequestedRightAttribut;
|
|
|
|
/**
|
|
* @author kevinfrantz
|
|
*/
|
|
class RequestedRightAttributTest extends TestCase
|
|
{
|
|
/**
|
|
* @var RequestedRightAttributInterface
|
|
*/
|
|
protected $requestedRightAttribut;
|
|
|
|
public function setUp(): void
|
|
{
|
|
$this->requestedRightAttribut = new class() implements RequestedRightAttributInterface {
|
|
use RequestedRightAttribut;
|
|
};
|
|
}
|
|
|
|
public function testConstructor(): void
|
|
{
|
|
$this->expectException(\TypeError::class);
|
|
$this->requestedRightAttribut->getRequestedRight();
|
|
}
|
|
|
|
public function testAccessors(): void
|
|
{
|
|
$requestedRight = $this->createMock(RequestedRightInterface::class);
|
|
$this->assertNull($this->requestedRightAttribut->setRequestedRight($requestedRight));
|
|
$this->assertEquals($requestedRight, $this->requestedRightAttribut->getRequestedRight());
|
|
}
|
|
}
|