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

31 lines
792 B
PHP
Raw Normal View History

<?php
2019-01-20 10:41:58 +01:00
namespace App\Tests\Unit\Attribut;
use PHPUnit\Framework\TestCase;
2018-11-25 23:38:22 +01:00
use App\Entity\Meta\Relation\RelationInterface;
2019-01-20 10:41:58 +01:00
use App\Attribut\RelationAttributInterface;
use App\Attribut\RelationAttribut;
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());
}
}