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

31 lines
903 B
PHP
Raw Normal View History

2018-11-25 23:12:42 +01:00
<?php
namespace Infinito\Tests\Unit\Attribut;
2018-11-25 23:12:42 +01:00
use Infinito\Attribut\ParentRelationAttribut;
2020-04-02 21:13:35 +02:00
use Infinito\Attribut\ParentRelationAttributInterface;
use Infinito\Entity\Meta\Relation\Parent\ParentRelationInterface;
2020-04-02 21:13:35 +02:00
use PHPUnit\Framework\TestCase;
2018-11-25 23:12:42 +01:00
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());
}
}