forked from Codeception/Codeception
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Codeception#5685: support non-entity doctrine @id, e.g. Ramsey\Uuid\U…
…uid on the haveInRepository debug message.
- Loading branch information
Showing
4 changed files
with
77 additions
and
2 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
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
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,31 @@ | ||
<?php | ||
|
||
use Doctrine\ORM\Mapping as ORM; | ||
use Ramsey\Uuid\Uuid; | ||
use Ramsey\Uuid\UuidInterface; | ||
|
||
/** | ||
* @ORM\Entity | ||
*/ | ||
class EntityWithUuid | ||
{ | ||
/** | ||
* @var UuidInterface | ||
* | ||
* @ORM\Id | ||
* @ORM\Column(type="uuid", unique=true) | ||
* @ORM\GeneratedValue(strategy="CUSTOM") | ||
* @ORM\CustomIdGenerator(class="Ramsey\Uuid\Doctrine\UuidGenerator") | ||
*/ | ||
private $id; | ||
|
||
public function __construct() | ||
{ | ||
$this->id = Uuid::uuid4(); | ||
} | ||
|
||
public function getId() | ||
{ | ||
return $this->id; | ||
} | ||
} |
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