mirror of
https://github.com/symfony/form.git
synced 2026-03-24 00:02:23 +01:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user