Implemented childs attribute test and code formating

This commit is contained in:
Kevin Frantz
2018-11-04 13:14:11 +01:00
parent 2e9b33c82b
commit d20b3f2504
2 changed files with 43 additions and 6 deletions

View File

@@ -1,4 +1,5 @@
<?php
namespace tests\Unit\Entity\Meta;
use PHPUnit\Framework\TestCase;
@@ -9,20 +10,20 @@ use Doctrine\Common\Collections\Collection;
class RelationTest extends TestCase
{
/**
*
* @var RelationInterface
*/
protected $relation;
public function setUp():void{
public function setUp(): void
{
$this->relation = new Relation();
}
public function testConstructor():void {
public function testConstructor(): void
{
$this->assertInstanceOf(Collection::class, $this->relation->getChilds());
$this->assertInstanceOf(Collection::class, $this->relation->getParents());
$this->expectException(\TypeError::class);
$this->relation->getSource();
}
}