Skip to content

Commit 7c0ae4e

Browse files
committed
Fixed type issues from dataProviderTestThatManyToOneAssociationMethodsWorksAsExpected method
1 parent fe5042b commit 7c0ae4e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tests/Integration/TestCase/EntityTestCase.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -582,21 +582,21 @@ public static function dataProviderTestThatManyToOneAssociationMethodsWorksAsExp
582582
// Get entity class meta data
583583
$meta = $entityManager->getClassMetadata(static::$entityName);
584584

585-
$iterator = static function (array $mapping) use ($meta): array {
585+
$iterator = static function (AssociationMapping $mapping) use ($meta): array {
586586
$params = [null];
587587

588-
if ($mapping['targetEntity'] === Role::class) {
588+
if ($mapping->targetEntity === Role::class) {
589589
$params = ['Some Role'];
590590
}
591591

592-
$targetEntity = new $mapping['targetEntity'](...$params);
592+
$targetEntity = new $mapping->targetEntity(...$params);
593593

594594
return [
595595
[
596-
$meta->isReadOnly ? null : 'set' . ucfirst((string)$mapping['fieldName']),
597-
'get' . ucfirst((string)$mapping['fieldName']),
596+
$meta->isReadOnly ? null : 'set' . ucfirst($mapping->fieldName),
597+
'get' . ucfirst($mapping->fieldName),
598598
$targetEntity,
599-
$mapping['fieldName'],
599+
$mapping->fieldName,
600600
$mapping,
601601
],
602602
];
@@ -608,7 +608,7 @@ public static function dataProviderTestThatManyToOneAssociationMethodsWorksAsExp
608608

609609
$items = array_filter(
610610
$meta->getAssociationMappings(),
611-
static fn (array $mapping): bool => $mapping['type'] === ClassMetadata::MANY_TO_ONE
611+
static fn (AssociationMapping $mapping): bool => $mapping->type() === ClassMetadata::MANY_TO_ONE
612612
);
613613

614614
if (empty($items)) {

0 commit comments

Comments
 (0)