refactor #14922 [CS][DX] Refactor (github-actions[bot])

This PR was merged into the 1.13 branch.

Discussion
----------

This PR has been generated automatically.
For more details see [refactor.yaml](/Sylius/Sylius/blob/1.12/.github/workflows/refactor.yaml).

Commits
-------

5923a45553 [CS][DX] Refactor
This commit is contained in:
Jacob Tobiasz 2023-04-19 06:40:02 +02:00 committed by GitHub
commit c75bc1e9e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -161,7 +161,6 @@ final class HasEnabledEntityValidatorSpec extends ObjectBehavior
$constraint->enabledPath = 'enabled';
$constraint->objectManager = 'custom';
$accessor->getValue($entity, 'enabled')->willReturn(false);
$registry->getManager('custom')->willReturn($manager);
$manager->getClassMetadata($entity->getWrappedObject()::class)->willReturn($metadata);
@ -171,7 +170,7 @@ final class HasEnabledEntityValidatorSpec extends ObjectBehavior
$repository->findBy(['enabled' => true])->willReturn([
$entity->getWrappedObject(),
$anotherEntity->getWrappedObject()
$anotherEntity->getWrappedObject(),
]);
$context->buildViolation(Argument::cetera())->shouldNotBeCalled();
@ -201,7 +200,7 @@ final class HasEnabledEntityValidatorSpec extends ObjectBehavior
$manager->getRepository($entity->getWrappedObject()::class)->willReturn($repository);
$repository->findBy(['enabled' => true])->willReturn([
$entity->getWrappedObject()
$entity->getWrappedObject(),
]);
$context->buildViolation($constraint->message)->willReturn($violationBuilder);
@ -234,7 +233,7 @@ final class HasEnabledEntityValidatorSpec extends ObjectBehavior
$manager->getRepository($entity->getWrappedObject()::class)->willReturn($repository);
$repository->findBy(['enabled' => true])->willReturn([
$entity->getWrappedObject()
$entity->getWrappedObject(),
]);
$context->buildViolation($constraint->message)->willReturn($violationBuilder);