Skip to content

Commit

Permalink
chore: support doctrine/orm 3.0 and doctrine/data-fixtures 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentchalamon committed Jan 14, 2025
1 parent 10e9613 commit e52261a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
"api-platform/core": "^3.0 || ^4.0",
"behat/behat": "^3.1",
"dg/bypass-finals": "^1.1",
"doctrine/data-fixtures": "^1.2",
"doctrine/data-fixtures": "^1.2 || ^2.0",
"doctrine/doctrine-bundle": "^2.11",
"doctrine/orm": "^2.6.3",
"doctrine/orm": "^2.6.3 || ^3.0",
"friends-of-behat/symfony-extension": "^2.0.11 || ^2.1.0",
"jms/serializer-bundle": "^1.4 || ^2.3 || ^3.0 || ^4.0 || ^5.0",
"laminas/laminas-code": "^3.4 || ^4.0",
Expand Down
5 changes: 3 additions & 2 deletions tests/Manager/Bridge/DoctrineManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,12 @@ protected function setUp(): void

public function testFindOneBy(): void
{
$expected = new \stdClass();
$this->registryMock->expects($this->once())->method('getManagerForClass')->with('class')->willReturn($this->managerMock);
$this->managerMock->expects($this->once())->method('getRepository')->with('class')->willReturn($this->repositoryMock);
$this->repositoryMock->expects($this->once())->method('findOneBy')->with(['criteria'])->willReturn('foo');
$this->repositoryMock->expects($this->once())->method('findOneBy')->with(['criteria'])->willReturn($expected);

$this->assertEquals('foo', $this->doctrineManager->findOneBy('class', ['criteria']));
$this->assertEquals($expected, $this->doctrineManager->findOneBy('class', ['criteria']));
}

public function testPersist(): void
Expand Down

0 comments on commit e52261a

Please sign in to comment.