mirror of
				https://github.com/kevinveenbirkenbach/infinito.git
				synced 2025-10-31 17:29:04 +00:00 
			
		
		
		
	Implemented tests for UserRepository and mapped data schema
This commit is contained in:
		| @@ -31,6 +31,7 @@ abstract class AbstractEntity implements EntityInterface | ||||
|  | ||||
|     public function __construct() | ||||
|     { | ||||
|         $this->version = 0; | ||||
|     } | ||||
|  | ||||
|     public function __toString(): string | ||||
|   | ||||
| @@ -25,6 +25,7 @@ final class Law extends AbstractMeta implements LawInterface | ||||
|  | ||||
|     public function __construct() | ||||
|     { | ||||
|         parent::__construct(); | ||||
|         $this->rights = new ArrayCollection(); | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -54,7 +54,7 @@ final class Relation extends AbstractMeta implements RelationInterface | ||||
|  | ||||
|     /** | ||||
|      * @ORM\OneToOne(targetEntity="App\Entity\Source\AbstractSource",cascade={"persist", "remove"}) | ||||
|      * @ORM\JoinColumn(name="source_id", referencedColumnName="id") | ||||
|      * @ORM\JoinColumn(name="source_id", referencedColumnName="id",onDelete="CASCADE") | ||||
|      * | ||||
|      * @var SourceInterface | ||||
|      */ | ||||
| @@ -70,6 +70,7 @@ final class Relation extends AbstractMeta implements RelationInterface | ||||
|  | ||||
|     public function __construct() | ||||
|     { | ||||
|         parent::__construct(); | ||||
|         $this->law = new Law(); | ||||
|         $this->parents = new ArrayCollection(); | ||||
|         $this->childs = new ArrayCollection(); | ||||
|   | ||||
| @@ -32,7 +32,7 @@ abstract class AbstractSource extends AbstractEntity implements SourceInterface | ||||
|     /** | ||||
|      * @var RelationInterface | ||||
|      * @ORM\OneToOne(targetEntity="App\Entity\Meta\Relation",cascade={"persist", "remove"}) | ||||
|      * @ORM\JoinColumn(name="relation_id", referencedColumnName="id") | ||||
|      * @ORM\JoinColumn(name="relation_id", referencedColumnName="id", onDelete="CASCADE") | ||||
|      * @Exclude | ||||
|      */ | ||||
|     protected $relation; | ||||
|   | ||||
| @@ -18,7 +18,7 @@ class UserSource extends AbstractCombinationSource implements UserSourceInterfac | ||||
|  | ||||
|     /** | ||||
|      * @ORM\OneToOne(targetEntity="App\Entity\User",cascade={"persist", "remove"}) | ||||
|      * @ORM\JoinColumn(name="user_id", referencedColumnName="id") | ||||
|      * @ORM\JoinColumn(name="user_id", referencedColumnName="id",onDelete="CASCADE") | ||||
|      * | ||||
|      * @var UserInterface | ||||
|      */ | ||||
|   | ||||
| @@ -22,7 +22,7 @@ class User extends BaseUser implements UserInterface | ||||
|     /** | ||||
|      * @var UserSourceInterface | ||||
|      * @ORM\OneToOne(targetEntity="App\Entity\Source\Combination\UserSource",cascade={"persist", "remove"}) | ||||
|      * @ORM\JoinColumn(name="source_user_id", referencedColumnName="id") | ||||
|      * @ORM\JoinColumn(name="source_user_id", referencedColumnName="id", onDelete="CASCADE") | ||||
|      */ | ||||
|     protected $source; | ||||
|  | ||||
| @@ -51,6 +51,7 @@ class User extends BaseUser implements UserInterface | ||||
|     public function __construct() | ||||
|     { | ||||
|         parent::__construct(); | ||||
|         $this->version = 0; | ||||
|         $this->isActive = true; | ||||
|         $this->source = new UserSource(); | ||||
|         $this->source->setUser($this); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user