2018-12-29 23:27:45 +01:00
|
|
|
<?php
|
|
|
|
|
2019-02-17 14:33:19 +01:00
|
|
|
namespace Infinito\Tests\Unit\Attribut;
|
2018-12-29 23:27:45 +01:00
|
|
|
|
|
|
|
use PHPUnit\Framework\TestCase;
|
2019-02-17 14:33:19 +01:00
|
|
|
use Infinito\Attribut\RightAttributInterface;
|
|
|
|
use Infinito\Attribut\RightAttribut;
|
|
|
|
use Infinito\Entity\Meta\RightInterface;
|
2018-12-29 23:27:45 +01:00
|
|
|
|
2019-01-26 19:39:36 +01:00
|
|
|
/**
|
|
|
|
* @author kevinfrantz
|
|
|
|
*/
|
2018-12-29 23:27:45 +01:00
|
|
|
class RightAttributTest extends TestCase
|
|
|
|
{
|
|
|
|
/***
|
|
|
|
* @var RightAttributInterface
|
|
|
|
*/
|
|
|
|
private $rightAttribut;
|
|
|
|
|
|
|
|
public function setUp(): void
|
|
|
|
{
|
|
|
|
$this->rightAttribut = new class() implements RightAttributInterface {
|
|
|
|
use RightAttribut;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testAccessors(): void
|
|
|
|
{
|
|
|
|
$right = $this->createMock(RightInterface::class);
|
|
|
|
$this->assertNull($this->rightAttribut->setRight($right));
|
|
|
|
$this->assertEquals($right, $this->rightAttribut->getRight());
|
|
|
|
}
|
|
|
|
}
|