mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-01-10 06:27:24 +01:00
Implemented parents attribut test
This commit is contained in:
parent
d20b3f2504
commit
e28f17b88e
@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Entity\Attribut;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
use App\Entity\Attribut\ParentsAttributInterface;
|
||||||
|
use App\Entity\Attribut\ParentsAttribut;
|
||||||
|
use Doctrine\Common\Collections\ArrayCollection;
|
||||||
|
|
||||||
|
class ParentsAttributTest extends TestCase
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @var ParentsAttributInterface
|
||||||
|
*/
|
||||||
|
protected $parents;
|
||||||
|
|
||||||
|
public function setUp(): void
|
||||||
|
{
|
||||||
|
$this->parents = new class() implements ParentsAttributInterface {
|
||||||
|
use ParentsAttribut;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testConstructor(): void
|
||||||
|
{
|
||||||
|
$this->expectException(\TypeError::class);
|
||||||
|
$this->parents->getParents();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testAccessors(): void
|
||||||
|
{
|
||||||
|
$parents = new ArrayCollection();
|
||||||
|
$this->assertNull($this->parents->setParents($parents));
|
||||||
|
$this->assertEquals($parents, $this->parents->getParents());
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user