Skip to content

Commit 0b37d89

Browse files
committed
Fix Calendar tests mocking a non-existant method.
There is no ITimeFactory::getTimestamp method, only getTime Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 parent 15c45b5 commit 0b37d89

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

tests/lib/Calendar/ManagerTest.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ public function testHandleImipReplyWrongMethod(): void {
251251
$this->logger->expects(self::once())
252252
->method('warning');
253253
$this->time->expects(self::never())
254-
->method('getTimestamp');
254+
->method('getTime');
255255

256256
$result = $this->manager->handleIMipReply($principalUri, $sender, $recipient, $calendarData->serialize());
257257
$this->assertFalse($result);
@@ -266,7 +266,7 @@ public function testHandleImipReplyOrganizerNotRecipient(): void {
266266
$this->logger->expects(self::once())
267267
->method('warning');
268268
$this->time->expects(self::never())
269-
->method('getTimestamp');
269+
->method('getTime');
270270

271271
$result = $this->manager->handleIMipReply($principalUri, $sender, $recipient, $calendarData->serialize());
272272
$this->assertFalse($result);
@@ -280,7 +280,7 @@ public function testHandleImipReplyDateInThePast(): void {
280280
$calendarData->VEVENT->DTSTART = new \DateTime('2013-04-07'); // set to in the past
281281

282282
$this->time->expects(self::once())
283-
->method('getTimestamp')
283+
->method('getTime')
284284
->willReturn(time());
285285

286286
$this->logger->expects(self::once())
@@ -308,7 +308,7 @@ public function testHandleImipReplyNoCalendars(): void {
308308
$calendarData = $this->getVCalendarReply();
309309

310310
$this->time->expects(self::once())
311-
->method('getTimestamp')
311+
->method('getTime')
312312
->willReturn(202208219);
313313
$manager->expects(self::once())
314314
->method('getCalendarsForPrincipal')
@@ -339,7 +339,7 @@ public function testHandleImipReplyEventNotFound(): void {
339339
$calendarData = $this->getVCalendarReply();
340340

341341
$this->time->expects(self::once())
342-
->method('getTimestamp')
342+
->method('getTime')
343343
->willReturn(202208219);
344344
$manager->expects(self::once())
345345
->method('getCalendarsForPrincipal')
@@ -375,7 +375,7 @@ public function testHandleImipReply(): void {
375375
$calendarData = $this->getVCalendarReply();
376376

377377
$this->time->expects(self::once())
378-
->method('getTimestamp')
378+
->method('getTime')
379379
->willReturn(202208219);
380380
$manager->expects(self::once())
381381
->method('getCalendarsForPrincipal')
@@ -402,7 +402,7 @@ public function testHandleImipCancelWrongMethod(): void {
402402
$this->logger->expects(self::once())
403403
->method('warning');
404404
$this->time->expects(self::never())
405-
->method('getTimestamp');
405+
->method('getTime');
406406

407407
$result = $this->manager->handleIMipCancel($principalUri, $sender, $replyTo, $recipient, $calendarData->serialize());
408408
$this->assertFalse($result);
@@ -419,7 +419,7 @@ public function testHandleImipCancelAttendeeNotRecipient(): void {
419419
$this->logger->expects(self::once())
420420
->method('warning');
421421
$this->time->expects(self::never())
422-
->method('getTimestamp');
422+
->method('getTime');
423423

424424
$result = $this->manager->handleIMipCancel($principalUri, $sender, $replyTo, $recipient, $calendarData->serialize());
425425
$this->assertFalse($result);
@@ -434,7 +434,7 @@ public function testHandleImipCancelDateInThePast(): void {
434434
$calendarData->VEVENT->DTSTART = new \DateTime('2013-04-07'); // set to in the past
435435

436436
$this->time->expects(self::once())
437-
->method('getTimestamp')
437+
->method('getTime')
438438
->willReturn(time());
439439
$this->logger->expects(self::once())
440440
->method('warning');
@@ -462,7 +462,7 @@ public function testHandleImipCancelNoCalendars(): void {
462462
$calendarData = $this->getVCalendarCancel();
463463

464464
$this->time->expects(self::once())
465-
->method('getTimestamp')
465+
->method('getTime')
466466
->willReturn(202208219);
467467
$manager->expects(self::once())
468468
->method('getCalendarsForPrincipal')
@@ -496,7 +496,7 @@ public function testHandleImipCancelOrganiserInReplyTo(): void {
496496
$calendarData->VEVENT->METHOD = 'CANCEL';
497497

498498
$this->time->expects(self::once())
499-
->method('getTimestamp')
499+
->method('getTime')
500500
->willReturn(202208219);
501501
$manager->expects(self::once())
502502
->method('getCalendarsForPrincipal')
@@ -533,7 +533,7 @@ public function testHandleImipCancel(): void {
533533
$calendarData->VEVENT->METHOD = 'CANCEL';
534534

535535
$this->time->expects(self::once())
536-
->method('getTimestamp')
536+
->method('getTime')
537537
->willReturn(202208219);
538538
$manager->expects(self::once())
539539
->method('getCalendarsForPrincipal')

0 commit comments

Comments
 (0)