mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 23:23:51 +00:00
[centerHistory] add conditions to be sure at least one center history exists per person
This commit is contained in:
@@ -61,11 +61,11 @@ class PersonMoveTest extends KernelTestCase
|
||||
$move = new PersonMove($this->em, $this->personMoveManager, $this->eventDispatcher);
|
||||
$sqls = $move->getSQL($personA, $personB);
|
||||
$conn = $this->em->getConnection();
|
||||
// $this->em->getConnection()->transactional(function (Connection $conn) use ($personA, $personB, $sqls) {
|
||||
$this->em->getConnection()->transactional(function (Connection $conn) use ($personA, $personB, $sqls) {
|
||||
foreach ($sqls as $sql) {
|
||||
$conn->executeStatement($sql);
|
||||
}
|
||||
// });
|
||||
});
|
||||
|
||||
$personA = $this->em->find(Person::class, $personA->getId());
|
||||
$personB = $this->em->find(Person::class, $personB->getId());
|
||||
@@ -100,11 +100,11 @@ class PersonMoveTest extends KernelTestCase
|
||||
$move = new PersonMove($this->em, $this->personMoveManager, $this->eventDispatcher);
|
||||
$sqls = $move->getSQL($personA, $personB);
|
||||
$conn = $this->em->getConnection();
|
||||
// $this->em->getConnection()->transactional(function (Connection $conn) use ($personA, $personB, $sqls) {
|
||||
$this->em->getConnection()->transactional(function (Connection $conn) use ($personA, $personB, $sqls) {
|
||||
foreach ($sqls as $sql) {
|
||||
$conn->executeStatement($sql);
|
||||
}
|
||||
// });
|
||||
});
|
||||
|
||||
$personA = $this->em->find(Person::class, $personA->getId());
|
||||
$personB = $this->em->find(Person::class, $personB->getId());
|
||||
|
Reference in New Issue
Block a user