Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet authored and github-actions[bot] committed Sep 29, 2023
1 parent aa97549 commit df22a93
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"phpstan/phpstan-strict-rules": "^1.0",
"phpunit/phpunit": "^9.5.13",
"psalm/plugin-phpunit": "^0.18",
"rector/rector": "^0.17",
"rector/rector": "^0.18",
"symfony/dependency-injection": "^5.4 || ^6.2",
"symfony/doctrine-bridge": "^5.4 || ^6.2",
"symfony/expression-language": "^5.4 || ^6.2",
Expand Down
14 changes: 6 additions & 8 deletions tests/Adapter/ORM/DoctrineORMAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function testNormalizedIdentifierWithNoManager(): void

public function testNormalizedIdentifierWithNotManaged(): void
{
$unitOfWork = $this->getMockBuilder(UnitOfWork::class)->disableOriginalConstructor()->getMock();
$unitOfWork = $this->createMock(UnitOfWork::class);
$unitOfWork->expects(static::once())->method('isInIdentityMap')->willReturn(false);

$manager = $this->createMock(EntityManagerInterface::class);
Expand All @@ -57,11 +57,11 @@ public function testNormalizedIdentifierWithNotManaged(): void
/**
* @param int[] $data
*
* @dataProvider getFixtures
* @dataProvider provideNormalizedIdentifierWithValidObjectCases
*/
public function testNormalizedIdentifierWithValidObject(array $data, string $expected): void
{
$unitOfWork = $this->getMockBuilder(UnitOfWork::class)->disableOriginalConstructor()->getMock();
$unitOfWork = $this->createMock(UnitOfWork::class);
$unitOfWork->expects(static::once())->method('isInIdentityMap')->willReturn(true);
$unitOfWork->expects(static::once())->method('getEntityIdentifier')->willReturn($data);

Expand All @@ -79,11 +79,9 @@ public function testNormalizedIdentifierWithValidObject(array $data, string $exp
/**
* @return iterable<array-key, array{array<int>, string}>
*/
public function getFixtures(): iterable
public function provideNormalizedIdentifierWithValidObjectCases(): iterable
{
return [
[[1], '1'],
[[1, 2], '1~2'],
];
yield [[1], '1'];
yield [[1, 2], '1~2'];
}
}

0 comments on commit df22a93

Please sign in to comment.