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

31 lines
917 B
PHP
Raw Permalink 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\CreatorRelationAttribut;
2020-04-02 21:13:35 +02:00
use Infinito\Attribut\CreatorRelationAttributInterface;
use Infinito\Entity\Meta\Relation\Parent\CreatorRelationInterface;
2020-04-02 21:13:35 +02:00
use PHPUnit\Framework\TestCase;
2018-11-25 23:12:42 +01:00
class CreatorRelationAttributTest extends TestCase
{
/***
* @var CreatorRelationAttributInterface
*/
protected $creatorRelationAttribut;
public function setUp(): void
{
$this->creatorRelationAttribut = new class() implements CreatorRelationAttributInterface {
use CreatorRelationAttribut;
};
}
public function testAccessors(): void
{
$relation = $this->createMock(CreatorRelationInterface::class);
$this->assertNull($this->creatorRelationAttribut->setCreatorRelation($relation));
$this->assertEquals($relation, $this->creatorRelationAttribut->getCreatorRelation());
}
}