forked from Codeception/Codeception
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Codeception#5663: build failing test
- Loading branch information
Showing
4 changed files
with
153 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?php | ||
|
||
namespace CircularRelations; | ||
|
||
use Doctrine\Common\Collections\ArrayCollection; | ||
use Doctrine\Common\Collections\Collection; | ||
use Doctrine\ORM\Mapping as ORM; | ||
|
||
/** | ||
* @ORM\Entity | ||
* @ORM\Table(name="circular_a") | ||
*/ | ||
class A | ||
{ | ||
/** | ||
* @var int|null | ||
* | ||
* @ORM\Id | ||
* @ORM\Column(type="integer") | ||
* @ORM\GeneratedValue | ||
*/ | ||
private $id; | ||
|
||
/** | ||
* @var \Doctrine\Common\Collections\ArrayCollection | ||
* @ORM\OneToMany(targetEntity="C", mappedBy="a") | ||
*/ | ||
private $cs; | ||
|
||
public function __construct() | ||
{ | ||
$this->cs = new ArrayCollection(); | ||
} | ||
|
||
/** | ||
* @return int|null | ||
*/ | ||
public function getId() | ||
{ | ||
return $this->id; | ||
} | ||
|
||
/** | ||
* @return \Doctrine\Common\Collections\ArrayCollection | ||
*/ | ||
public function getCs() | ||
{ | ||
return $this->cs; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
|
||
namespace CircularRelations; | ||
use Doctrine\Common\Collections\ArrayCollection; | ||
use Doctrine\ORM\Mapping as ORM; | ||
|
||
/** | ||
* @ORM\Entity | ||
* @ORM\Table(name="circular_b") | ||
*/ | ||
class B | ||
{ | ||
/** | ||
* @var int|null | ||
* | ||
* @ORM\Id | ||
* @ORM\Column(type="integer") | ||
* @ORM\GeneratedValue | ||
*/ | ||
private $id; | ||
|
||
/** | ||
* @var \Doctrine\Common\Collections\ArrayCollection | ||
* @ORM\OneToMany(targetEntity="C", mappedBy="b") | ||
*/ | ||
private $cs; | ||
|
||
public function __construct() | ||
{ | ||
$this->cs = new ArrayCollection(); | ||
} | ||
|
||
/** | ||
* @return int|null | ||
*/ | ||
public function getId() | ||
{ | ||
return $this->id; | ||
} | ||
|
||
/** | ||
* @return \Doctrine\Common\Collections\ArrayCollection | ||
*/ | ||
public function getCs() | ||
{ | ||
return $this->cs; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
|
||
namespace CircularRelations; | ||
|
||
use Doctrine\ORM\Mapping as ORM; | ||
|
||
/** | ||
* @ORM\Entity | ||
* @ORM\Table(name="circular_c") | ||
*/ | ||
class C | ||
{ | ||
/** | ||
* @var \CircularRelations\A | ||
* @ORM\Id | ||
* @ORM\ManyToOne(targetEntity="A", inversedBy="cs", cascade={"persist"}) | ||
*/ | ||
private $a; | ||
|
||
/** | ||
* @var \CircularRelations\B | ||
* @ORM\Id | ||
* @ORM\ManyToOne(targetEntity="B", inversedBy="cs", cascade={"persist"}) | ||
*/ | ||
private $b; | ||
|
||
/** | ||
* C constructor. | ||
* | ||
* @param \CircularRelations\A $a | ||
* @param \CircularRelations\B $b | ||
*/ | ||
public function __construct(\CircularRelations\A $a, \CircularRelations\B $b) | ||
{ | ||
$this->a = $a; | ||
$this->b = $b; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters