2019-01-26 16:42:13 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Tests\Unit\Attribut;
|
|
|
|
|
|
|
|
use PHPUnit\Framework\TestCase;
|
2019-05-30 16:52:02 +02:00
|
|
|
use Infinito\Domain\Request\Right\RequestedRightInterface;
|
2019-02-17 14:33:19 +01:00
|
|
|
use Infinito\Attribut\RequestedRightAttributInterface;
|
|
|
|
use Infinito\Attribut\RequestedRightAttribut;
|
2019-01-26 16:42:13 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @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));
|
2019-01-26 18:09:19 +01:00
|
|
|
$this->assertEquals($requestedRight, $this->requestedRightAttribut->getRequestedRight());
|
2019-01-26 16:42:13 +01:00
|
|
|
}
|
|
|
|
}
|