infinito/application/symfony/tests/Unit/Attribut/RightAttributTest.php

34 lines
761 B
PHP
Raw Normal View History

2018-12-29 23:27:45 +01:00
<?php
2019-01-20 10:41:58 +01:00
namespace App\Tests\Unit\Attribut;
2018-12-29 23:27:45 +01:00
use PHPUnit\Framework\TestCase;
2019-01-20 10:41:58 +01:00
use App\Attribut\RightAttributInterface;
use App\Attribut\RightAttribut;
2018-12-29 23:27:45 +01:00
use App\Entity\Meta\RightInterface;
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());
}
}