File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed
tests/Integration/Repository Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -325,12 +325,18 @@ public function testThatFindMethodCallsExpectedEntityManagerMethod(): void
325325 ApiKeyEntity::class,
326326 'id ' ,
327327 null ,
328- null
328+ null ,
329329 );
330330
331+ $ entityManager
332+ ->expects ($ this ->once ())
333+ ->method ('isOpen ' )
334+ ->willReturn (true );
335+
331336 $ managerObject
332337 ->expects ($ this ->once ())
333338 ->method ('getManagerForClass ' )
339+ ->with (ApiKeyEntity::class)
334340 ->willReturn ($ entityManager );
335341
336342 $ repository = new ApiKeyRepository ($ managerObject );
@@ -370,6 +376,11 @@ public function testThatFindOneByMethodCallsExpectedEntityManagerMethod(): void
370376 ->with (ApiKeyEntity::class)
371377 ->willReturn ($ repositoryMock );
372378
379+ $ entityManager
380+ ->expects ($ this ->once ())
381+ ->method ('isOpen ' )
382+ ->willReturn (true );
383+
373384 $ managerObject
374385 ->expects ($ this ->once ())
375386 ->method ('getManagerForClass ' )
@@ -419,6 +430,11 @@ public function testThatFindByMethodCallsExpectedEntityManagerMethod(): void
419430 ->with (ApiKeyEntity::class)
420431 ->willReturn ($ repositoryMock );
421432
433+ $ entityManager
434+ ->expects ($ this ->once ())
435+ ->method ('isOpen ' )
436+ ->willReturn (true );
437+
422438 $ managerObject
423439 ->expects ($ this ->once ())
424440 ->method ('getManagerForClass ' )
@@ -456,6 +472,11 @@ public function testThatFindAllMethodCallsExpectedEntityManagerMethod(): void
456472 ->with (ApiKeyEntity::class)
457473 ->willReturn ($ repositoryMock );
458474
475+ $ entityManager
476+ ->expects ($ this ->once ())
477+ ->method ('isOpen ' )
478+ ->willReturn (true );
479+
459480 $ managerObject
460481 ->expects ($ this ->once ())
461482 ->method ('getManagerForClass ' )
You can’t perform that action at this time.
0 commit comments