Skip to content

Commit b566d2d

Browse files
committed
Fixes unit tests
Issue: documentacao-e-tarefas/desenvolvimento_e_infra#1048 Signed-off-by: Thiago Brasil <thiago@lepidus.com.br>
1 parent 2f0744b commit b566d2d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tests/classes/services/ThothPublicationServiceTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,14 @@ public function testRegisterPublication()
5050

5151
$mockRepository = $this->getMockBuilder(ThothPublicationRepository::class)
5252
->setConstructorArgs([$this->getMockBuilder(ThothClient::class)->getMock()])
53-
->setMethods(['add'])
53+
->setMethods(['add', 'getIdByType'])
5454
->getMock();
5555
$mockRepository->expects($this->once())
5656
->method('add')
5757
->will($this->returnValue('4296c934-0f05-4920-a208-a5ab214b908a'));
58+
$mockRepository->expects($this->once())
59+
->method('getIdByType')
60+
->will($this->returnValue(null));
5861

5962
$mockPubFormat = $this->getMockBuilder(PublicationFormat::class)->getMock();
6063

0 commit comments

Comments
 (0)