2018-10-31 23:11:34 +01:00
|
|
|
<?php
|
|
|
|
|
2019-02-17 14:33:19 +01:00
|
|
|
namespace Infinito\Tests\Unit\Attribut;
|
2018-10-31 23:11:34 +01:00
|
|
|
|
|
|
|
use PHPUnit\Framework\TestCase;
|
2019-02-17 14:33:19 +01:00
|
|
|
use Infinito\Entity\Meta\Relation\RelationInterface;
|
|
|
|
use Infinito\Attribut\RelationAttributInterface;
|
|
|
|
use Infinito\Attribut\RelationAttribut;
|
2018-10-31 23:11:34 +01:00
|
|
|
|
|
|
|
class RelationAttributTest extends TestCase
|
|
|
|
{
|
|
|
|
/***
|
|
|
|
* @var RelationAttributInterface
|
|
|
|
*/
|
|
|
|
protected $relationAttribut;
|
|
|
|
|
|
|
|
public function setUp(): void
|
|
|
|
{
|
|
|
|
$this->relationAttribut = new class() implements RelationAttributInterface {
|
|
|
|
use RelationAttribut;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testAccessors(): void
|
|
|
|
{
|
|
|
|
$relation = $this->createMock(RelationInterface::class);
|
|
|
|
$this->assertNull($this->relationAttribut->setRelation($relation));
|
|
|
|
$this->assertEquals($relation, $this->relationAttribut->getRelation());
|
|
|
|
}
|
|
|
|
}
|