Removed deprecated trait from entities

This commit is contained in:
Kevin Frantz 2018-11-04 23:47:43 +01:00
parent e9993a2424
commit b5062c01ba
4 changed files with 8 additions and 9 deletions

View File

@ -2,7 +2,6 @@
namespace App\Entity\Source\Collection\Queue;
use App\Entity\Attribut\MembersAttributInterface;
use App\Entity\Source\Collection\CollectionSourceInterface;
use App\Entity\Source\SourceInterface;
@ -11,7 +10,7 @@ use App\Entity\Source\SourceInterface;
*
* @author kevinfrantz
*/
interface QueueSourceInterface extends CollectionSourceInterface, MembersAttributInterface
interface QueueSourceInterface extends CollectionSourceInterface
{
public function getPointerPosition(): int;

View File

@ -5,6 +5,7 @@ namespace App\Entity\Source\Collection;
use Doctrine\ORM\Mapping as ORM;
use App\Entity\Attribut\MembersAttribut;
use App\Entity\Method\CollectionDimensionHelperMethod;
use App\Entity\Attribut\CollectionAttribut;
/**
* @author kevinfrantz
@ -15,6 +16,6 @@ use App\Entity\Method\CollectionDimensionHelperMethod;
*/
class TreeCollectionSource extends AbstractCollectionSource implements TreeCollectionSourceInterface
{
use MembersAttribut;
use CollectionAttribut;
use CollectionDimensionHelperMethod;
}

View File

@ -2,12 +2,11 @@
namespace App\Entity\Source\Collection;
use App\Entity\Attribut\MembersAttributInterface;
use App\Helper\DimensionHelperInterface;
/**
* @author kevinfrantz
*/
interface TreeCollectionSourceInterface extends MembersAttributInterface, CollectionSourceInterface, DimensionHelperInterface
interface TreeCollectionSourceInterface extends CollectionSourceInterface, DimensionHelperInterface
{
}

View File

@ -27,19 +27,19 @@ class TreeCollectionSourceTest extends TestCase
public function testConstructor(): void
{
$this->assertInstanceOf(Collection::class, $this->tree->getMembers());
$this->assertInstanceOf(Collection::class, $this->tree->getCollection());
$this->assertInstanceOf(TreeCollectionSourceInterface::class, $this->tree);
$this->assertInstanceOf(DimensionHelperInterface::class, $this->tree);
}
public function testMembers()
public function testAccessors()
{
$member = new class() extends AbstractSource {
};
$this->tree->setMembers(new ArrayCollection([
$this->tree->setCollection(new ArrayCollection([
$member,
]));
$this->assertEquals($member, $this->tree->getMembers()
$this->assertEquals($member, $this->tree->getCollection()
->get(0));
}
}