Skip to content

Commit

Permalink
Fix tests for Doctrine ORM 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
acelaya committed Feb 17, 2024
1 parent 724f0b3 commit 0a99767
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion test/Doctrine/EntityRepositoryFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function setUp(): void
public function createsRequestedRepositoryClass(string $repoClass): void
{
$this->em->expects($this->once())->method('getClassMetadata')->with(stdClass::class)->willReturn(
$this->createMock(ClassMetadata::class),
new ClassMetadata(stdClass::class),
);

$repoInstance = EntityRepositoryFactory::{stdClass::class}($this->container, $repoClass);
Expand Down
1 change: 0 additions & 1 deletion test/Doctrine/NoDbNameConnectionFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ public function newConnectionIsCreatedRemovingDbNameFromOriginalConnectionParams
$this->originalConn->expects($this->once())->method('getParams')->willReturn($params);
$this->originalConn->expects($this->once())->method('getDriver')->willReturn($this->createMock(Driver::class));
$this->originalConn->expects($this->once())->method('getConfiguration')->willReturn(new Configuration());
$this->em->expects($this->once())->method('getEventManager')->willReturn(null);
$this->em->expects($this->once())->method('getConnection')->willReturn($this->originalConn);
$this->container->expects($this->once())->method('get')->with(EntityManager::class)->willReturn($this->em);

Expand Down

0 comments on commit 0a99767

Please sign in to comment.