Renamed GroupSourcesAttribut to MembershipsAttribut and Implemented\Optimized tests

This commit is contained in:
Kevin Frantz
2018-11-01 20:42:18 +01:00
parent 5f18245b73
commit 61186470da
10 changed files with 139 additions and 88 deletions

View File

@@ -15,6 +15,7 @@ use App\Entity\Meta\LawInterface;
use App\Entity\Meta\Law;
use Doctrine\Common\Collections\ArrayCollection;
use App\Entity\Source\Collection\MemberCollectionSource;
use App\Entity\Attribut\MembershipsAttribut;
/**
* @author kevinfrantz
@@ -28,7 +29,7 @@ use App\Entity\Source\Collection\MemberCollectionSource;
*/
abstract class AbstractSource extends AbstractEntity implements SourceInterface
{
use RelationAttribut,GroupSourcesAttribut, LawAttribut;
use RelationAttribut,MembershipsAttribut, LawAttribut;
/**
* @var RelationInterface
@@ -45,7 +46,7 @@ abstract class AbstractSource extends AbstractEntity implements SourceInterface
* @var Collection|MemberCollectionSource[]
* @ORM\ManyToMany(targetEntity="GroupSource",mappedBy="members")
*/
protected $groups;
protected $memberships;
/**
* @ORM\OneToOne(targetEntity="App\Entity\Meta\Law",cascade={"persist", "remove"})
@@ -61,6 +62,6 @@ abstract class AbstractSource extends AbstractEntity implements SourceInterface
$this->relation = new Relation();
$this->relation->setSource($this);
$this->law = new Law();
$this->groups = new ArrayCollection();
$this->memberships = new ArrayCollection();
}
}