Skip to content

Commit

Permalink
Avoid mocking several interfaces
Browse files Browse the repository at this point in the history
It is a code smell, but I am not sure it makes sense to introduce a
public interface for this.
  • Loading branch information
greg0ire committed Sep 26, 2020
1 parent f8ccfa5 commit 379bf70
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Tests/RegistryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
use ProxyManager\Proxy\ProxyInterface;
use stdClass;

interface LazyLoadingEntityManagerInterface extends LazyLoadingInterface, EntityManagerInterface
{
}

class RegistryTest extends TestCase
{
public function testGetDefaultConnectionName() : void
Expand Down Expand Up @@ -139,7 +143,7 @@ public function testReset() : void
$noProxyManager->expects($this->once())
->method('clear');

$proxyManager = $this->getMockBuilder([LazyLoadingInterface::class, EntityManagerInterface::class])->getMock();
$proxyManager = $this->createMock(LazyLoadingEntityManagerInterface::class);
$proxyManager->expects($this->once())
->method('setProxyInitializer')
->with($this->isInstanceOf(Closure::class));
Expand Down

0 comments on commit 379bf70

Please sign in to comment.