2018-11-24 14:59:15 +01:00
|
|
|
<?php
|
|
|
|
|
2019-01-20 10:41:58 +01:00
|
|
|
namespace Tests\Unit\Attribut;
|
2018-11-24 14:59:15 +01:00
|
|
|
|
|
|
|
use PHPUnit\Framework\TestCase;
|
2019-02-17 14:33:19 +01:00
|
|
|
use Infinito\Attribut\PriorityAttributInterface;
|
|
|
|
use Infinito\Attribut\PriorityAttribut;
|
2018-11-24 14:59:15 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @author kevinfrantz
|
|
|
|
*/
|
|
|
|
class PriorityAttributTest extends TestCase
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @var PriorityAttributInterface
|
|
|
|
*/
|
|
|
|
protected $priorityAttribut;
|
|
|
|
|
|
|
|
public function setUp(): void
|
|
|
|
{
|
|
|
|
$this->priorityAttribut = new class() implements PriorityAttributInterface {
|
|
|
|
use PriorityAttribut;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testConstructor(): void
|
|
|
|
{
|
|
|
|
$this->expectException(\TypeError::class);
|
|
|
|
$this->priorityAttribut->getPriority();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testAccessors(): void
|
|
|
|
{
|
|
|
|
$priority = 123;
|
|
|
|
$this->assertNull($this->priorityAttribut->setPriority($priority));
|
|
|
|
$this->assertEquals($priority, $this->priorityAttribut->getPriority());
|
|
|
|
}
|
|
|
|
}
|