Merge branch '7.4' into 8.0

* 7.4:
  do not use PHPUnit mock objects without configured expectations
  do not use PHPUnit mock objects without configured expectations
  do not use PHPUnit mock objects without configured expectations
  fix CS
  do not use PHPUnit mock objects without configured expectations
  [Scheduler] Fix array to string conversion in `#[AsCronTask]` arguments
  do not use PHPUnit mock objects without configured expectations
  do not use PHPUnit mock objects without configured expectations
  do not use PHPUnit mock objects without configured expectations
  do not use PHPUnit mock objects without configured expectations
  fix merge
  do not use PHPUnit mock objects without configured expectations
This commit is contained in:
Christian Flothmann
2026-01-08 23:36:47 +01:00

View File

@@ -168,8 +168,8 @@ class FormTypeValidatorExtensionTest extends BaseValidatorExtensionTestCase
->addPropertyConstraint('firstName', new NotBlank());
$organizationMetadata = (new ClassMetadata(Organization::class))
->addPropertyConstraint('authors', new Valid());
$metadataFactory = $this->createMock(MetadataFactoryInterface::class);
$metadataFactory->expects($this->any())
$metadataFactory = $this->createStub(MetadataFactoryInterface::class);
$metadataFactory
->method('getMetadataFor')
->willReturnCallback(static function ($classOrObject) use ($formMetadata, $authorMetadata, $organizationMetadata) {
if (Author::class === $classOrObject || $classOrObject instanceof Author) {
@@ -259,8 +259,8 @@ class FormTypeValidatorExtensionTest extends BaseValidatorExtensionTestCase
->addPropertyConstraint('firstName', new Length(1));
$organizationMetadata = (new ClassMetadata(Organization::class))
->addPropertyConstraint('authors', new Valid());
$metadataFactory = $this->createMock(MetadataFactoryInterface::class);
$metadataFactory->expects($this->any())
$metadataFactory = $this->createStub(MetadataFactoryInterface::class);
$metadataFactory
->method('getMetadataFor')
->willReturnCallback(static function ($classOrObject) use ($formMetadata, $authorMetadata, $organizationMetadata) {
if (Author::class === $classOrObject || $classOrObject instanceof Author) {