diff --git a/tests/php/Service/RoomServiceTest.php b/tests/php/Service/RoomServiceTest.php index 1a04b9a2a27..82ed7bf11f3 100644 --- a/tests/php/Service/RoomServiceTest.php +++ b/tests/php/Service/RoomServiceTest.php @@ -280,9 +280,11 @@ public function testCreateConversation(int $type, string $name, string $ownerId, ->method('addUsers'); } - $this->hasher->expects(self::once()) - ->method('hash') - ->willReturn($password); + if($password !== '') { + $this->hasher->expects(self::once()) + ->method('hash') + ->willReturn($password); + } $this->manager->expects($this->once()) ->method('createRoom') ->with($type, $name, $objectType, $objectId, $password)