diff options
author | Joas Schilling <coding@schilljs.com> | 2020-06-22 17:10:28 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-06-29 16:50:20 +0300 |
commit | e643202be6047aee2d81742b1f82f724e82ac62b (patch) | |
tree | 6689cd634dcfe80f6144cc2bed6e8618cacce1ab /tests | |
parent | 4655784a713bbd2eb3eb910a35e03af636a5f999 (diff) |
Make tests laxer
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/php/Service/RoomServiceTest.php | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/tests/php/Service/RoomServiceTest.php b/tests/php/Service/RoomServiceTest.php index de4d119a9..b5c411778 100644 --- a/tests/php/Service/RoomServiceTest.php +++ b/tests/php/Service/RoomServiceTest.php @@ -51,8 +51,7 @@ class RoomServiceTest extends TestCase { public function testCreateOneToOneConversationWithSameUser(): void { $user = $this->createMock(IUser::class); - $user->expects($this->exactly(2)) - ->method('getUID') + $user->method('getUID') ->willReturn('uid'); $this->expectException(\InvalidArgumentException::class); @@ -62,12 +61,10 @@ class RoomServiceTest extends TestCase { public function testCreateOneToOneConversationAlreadyExists(): void { $user1 = $this->createMock(IUser::class); - $user1->expects($this->exactly(2)) - ->method('getUID') + $user1->method('getUID') ->willReturn('uid1'); $user2 = $this->createMock(IUser::class); - $user2->expects($this->exactly(2)) - ->method('getUID') + $user2->method('getUID') ->willReturn('uid2'); $room = $this->createMock(Room::class); @@ -84,12 +81,10 @@ class RoomServiceTest extends TestCase { public function testCreateOneToOneConversationCreated(): void { $user1 = $this->createMock(IUser::class); - $user1->expects($this->exactly(3)) - ->method('getUID') + $user1->method('getUID') ->willReturn('uid1'); $user2 = $this->createMock(IUser::class); - $user2->expects($this->exactly(3)) - ->method('getUID') + $user2->method('getUID') ->willReturn('uid2'); $room = $this->createMock(Room::class); @@ -205,8 +200,7 @@ class RoomServiceTest extends TestCase { if ($ownerId !== '') { $owner = $this->createMock(IUser::class); - $owner->expects($this->once()) - ->method('getUID') + $owner->method('getUID') ->willReturn($ownerId); $room->expects($this->once()) |