2018-11-06 22:27:06 +01:00
|
|
|
<?php
|
|
|
|
|
2019-01-20 10:41:58 +01:00
|
|
|
namespace Tests\Unit\Attribut;
|
2018-11-06 22:27:06 +01:00
|
|
|
|
2019-02-17 14:33:19 +01:00
|
|
|
use Infinito\Attribut\GrantAttribut;
|
|
|
|
use Infinito\Attribut\GrantAttributInterface;
|
2020-04-02 21:13:35 +02:00
|
|
|
use PHPUnit\Framework\TestCase;
|
2018-11-06 22:27:06 +01:00
|
|
|
|
|
|
|
class GrantAttributTest extends TestCase
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @var GrantAttributInterface
|
|
|
|
*/
|
|
|
|
protected $grant;
|
|
|
|
|
|
|
|
public function setUp(): void
|
|
|
|
{
|
|
|
|
$this->grant = new class() implements GrantAttributInterface {
|
|
|
|
use GrantAttribut;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testConstruct(): void
|
|
|
|
{
|
|
|
|
$this->expectException(\TypeError::class);
|
|
|
|
$this->grant->getGrant();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testAccessors(): void
|
|
|
|
{
|
|
|
|
$grant = true;
|
|
|
|
$this->assertNull($this->grant->setGrant($grant));
|
|
|
|
$this->assertEquals($grant, $this->grant->getGrant());
|
|
|
|
}
|
|
|
|
}
|