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

31 lines
918 B
PHP
Raw Normal View History

2018-11-25 23:12:42 +01:00
<?php
namespace App\Tests\Unit\Entity\Attribut;
use PHPUnit\Framework\TestCase;
use App\Entity\Attribut\CreatorRelationAttributInterface;
use App\Entity\Attribut\CreatorRelationAttribut;
2018-11-25 23:38:22 +01:00
use App\Entity\Meta\Relation\Parent\CreatorRelationInterface;
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());
}
}