2018-11-26 21:41:06 +01:00
|
|
|
<?php
|
|
|
|
|
2019-01-20 10:41:58 +01:00
|
|
|
namespace Tests\Unit\Attribut;
|
2018-11-26 21:41:06 +01:00
|
|
|
|
|
|
|
use PHPUnit\Framework\TestCase;
|
2019-01-20 10:41:58 +01:00
|
|
|
use App\Attribut\MemberRelationAttributInterface;
|
|
|
|
use App\Attribut\MemberRelationAttribut;
|
2018-11-26 21:41:06 +01:00
|
|
|
use App\Entity\Meta\Relation\Member\MemberRelationInterface;
|
|
|
|
|
|
|
|
class MemberRelationAttributTest extends TestCase
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @var MemberRelationAttributInterface
|
|
|
|
*/
|
|
|
|
protected $memberRelation;
|
|
|
|
|
|
|
|
public function setUp(): void
|
|
|
|
{
|
|
|
|
$this->memberRelation = new class() implements MemberRelationAttributInterface {
|
|
|
|
use MemberRelationAttribut;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testConstructor(): void
|
|
|
|
{
|
|
|
|
$this->expectException(\TypeError::class);
|
|
|
|
$this->memberRelation->getMemberRelation();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testAccessors(): void
|
|
|
|
{
|
|
|
|
$membership = $this->createMock(MemberRelationInterface::class);
|
2018-11-26 22:30:08 +01:00
|
|
|
$this->assertNull($this->memberRelation->setMemberRelation($membership));
|
|
|
|
$this->assertEquals($this->memberRelation->getMemberRelation(), $membership);
|
2018-11-26 21:41:06 +01:00
|
|
|
}
|
|
|
|
}
|