2018-11-25 23:12:42 +01:00
|
|
|
<?php
|
|
|
|
|
2019-01-20 10:41:58 +01:00
|
|
|
namespace App\Tests\Unit\Attribut;
|
2018-11-25 23:12:42 +01:00
|
|
|
|
|
|
|
use PHPUnit\Framework\TestCase;
|
2019-01-20 10:41:58 +01:00
|
|
|
use App\Attribut\ParentRelationAttributInterface;
|
|
|
|
use App\Attribut\ParentRelationAttribut;
|
2018-11-25 23:12:42 +01:00
|
|
|
use App\Entity\Meta\Relation\Parent\ParentRelationInterface;
|
|
|
|
|
|
|
|
class ParentRelationAttributTest extends TestCase
|
|
|
|
{
|
|
|
|
/***
|
|
|
|
* @var ParentRelationAttributInterface
|
|
|
|
*/
|
|
|
|
protected $parentRelationAttribut;
|
|
|
|
|
|
|
|
public function setUp(): void
|
|
|
|
{
|
|
|
|
$this->parentRelationAttribut = new class() implements ParentRelationAttributInterface {
|
|
|
|
use ParentRelationAttribut;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testAccessors(): void
|
|
|
|
{
|
|
|
|
$relation = $this->createMock(ParentRelationInterface::class);
|
|
|
|
$this->assertNull($this->parentRelationAttribut->setParentRelation($relation));
|
|
|
|
$this->assertEquals($relation, $this->parentRelationAttribut->getParentRelation());
|
|
|
|
}
|
|
|
|
}
|