Merge pull request #8 from wayofdev/feat/save-entity #21
Annotations
1 error and 6 warnings
🧪 Run mutation testing using Xdebug and infection/infection
Process completed with exit code 1.
|
🧪 Run mutation testing using Xdebug and infection/infection:
src/ActiveRecord.php#L102
Escaped Mutant for Mutator "TrueValue":
--- Original
+++ New
@@ @@
* @throws NotFoundExceptionInterface
* @throws Throwable
*/
- public final function save(bool $cascade = true) : StateInterface
+ public final function save(bool $cascade = false) : StateInterface
{
/** @var EntityManager $entityManager */
$entityManager = Facade::getEntityManager();
|
🧪 Run mutation testing using Xdebug and infection/infection:
src/ActiveRecord.php#L108
Escaped Mutant for Mutator "FalseValue":
--- Original
+++ New
@@ @@
/** @var EntityManager $entityManager */
$entityManager = Facade::getEntityManager();
$entityManager->persist($this, $cascade);
- return $entityManager->run(throwException: false);
+ return $entityManager->run(throwException: true);
}
/**
* Persists the current entity and throws an exception if an error occurs.
|
🧪 Run mutation testing using Xdebug and infection/infection:
src/ActiveRecord.php#L118
Escaped Mutant for Mutator "TrueValue":
--- Original
+++ New
@@ @@
* @throws NotFoundExceptionInterface
* @throws Throwable
*/
- public final function saveOrFail(bool $cascade = true) : StateInterface
+ public final function saveOrFail(bool $cascade = false) : StateInterface
{
/** @var EntityManager $entityManager */
$entityManager = Facade::getEntityManager();
|
🧪 Run mutation testing using Xdebug and infection/infection:
src/ActiveRecord.php#L131
Escaped Mutant for Mutator "TrueValue":
--- Original
+++ New
@@ @@
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
- public final function persist(bool $cascade = true) : EntityManagerInterface
+ public final function persist(bool $cascade = false) : EntityManagerInterface
{
return Facade::getEntityManager()->persist($this, $cascade);
}
}
|
🧪 Run mutation testing using Xdebug and infection/infection:
src/Bridge/Spiral/Bootloader/ActiveRecordBootloader.php#L21
Escaped Mutant for Mutator "PublicVisibility":
--- Original
+++ New
@@ @@
{
return [CycleOrmBootloader::class];
}
- public function init(ContainerInterface $container) : void
+ protected function init(ContainerInterface $container) : void
{
Facade::setContainer($container);
}
}
|
🧪 Run mutation testing using Xdebug and infection/infection:
src/Facade.php#L41
Escaped Mutant for Mutator "AssignCoalesce":
--- Original
+++ New
@@ @@
if (null === self::$container) {
throw new RuntimeException('The container is not configured.');
}
- self::$orm ??= self::$container->get(ORMInterface::class);
+ self::$orm = self::$container->get(ORMInterface::class);
if (null === self::$orm) {
throw new RuntimeException('The ORM Carrier is not configured.');
}
|
Loading