Skip to content

Commit 7b4a6b0

Browse files
committed
minor #61644 [Validator] fix tests (xabbuh)
This PR was merged into the 7.4 branch. Discussion ---------- [Validator] fix tests | Q | A | ------------- | --- | Branch? | 7.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | | License | MIT Commits ------- 1e8f471 fix tests
2 parents 1bb4dda + 1e8f471 commit 7b4a6b0

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/Symfony/Component/Validator/Tests/Mapping/Loader/XmlFileLoaderTest.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,8 @@ public function testLoadConstraintWithoutNamedArgumentsSupport()
203203
$loader->loadClassMetadata($metadata);
204204
}
205205

206-
/**
207-
* @group legacy
208-
*/
206+
#[IgnoreDeprecations]
207+
#[Group('legacy')]
209208
public function testLengthConstraintValueOptionTriggersDeprecation()
210209
{
211210
$loader = new XmlFileLoader(__DIR__.'/constraint-mapping-exactly-value.xml');
@@ -214,7 +213,7 @@ public function testLengthConstraintValueOptionTriggersDeprecation()
214213
$this->expectUserDeprecationMessage(\sprintf('Since symfony/validator 7.3: Passing an array of options to configure the "%s" constraint is deprecated, use named arguments instead.', Length::class));
215214

216215
$loader->loadClassMetadata($metadata);
217-
$constraints = $metadata->getPropertyMetadata('title')[0]->constraints;
216+
$constraints = $metadata->getPropertyMetadata('title')[0]->getConstraints();
218217

219218
self::assertCount(1, $constraints);
220219
self::assertInstanceOf(Length::class, $constraints[0]);

0 commit comments

Comments
 (0)