mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
[PR #1] [CLOSED] EntityManager: add setRepository() method #7586
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/doctrine/orm/pull/1
Author: @maxim-oleinik
Created: 9/9/2010
Status: ❌ Closed
Base:
master← Head:em_set_repo📝 Commits (1)
0d94f78EntityManager: add setRepository() method📊 Changes
1 file changed (+15 additions, -1 deletions)
View changed files
📝
lib/Doctrine/ORM/EntityManager.php(+15 -1)📄 Description
Goal is to have opportunity to set mocked repo.
// PHPUnit $repo = $this->getMock('ArticleRepository', array('findActiveByAuthor'), array($em, $metadata)); $repo->expects($this->once()) ->method('findActiveByAuthor'); $em->setRepository($entityName, $repo); // Proxy call $author->getArticles();🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.