diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2021-11-29 16:03:41 +0300 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2021-11-29 16:15:40 +0300 |
commit | 693b1fb8a54a32b1a87570a6b019588647f735ca (patch) | |
tree | 3c06984e6a9e5ce127a02bce94df3aa59a6b3b8e /tests | |
parent | dea3242a528679102cb39b1689af192f74a69ba8 (diff) |
Log debug infos of appointment slots
The logic is a black box otherwise and impossible to debug in
production.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/php/unit/Service/Appointments/BookingServiceTest.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/php/unit/Service/Appointments/BookingServiceTest.php b/tests/php/unit/Service/Appointments/BookingServiceTest.php index 2c025b64..f27bc8c7 100644 --- a/tests/php/unit/Service/Appointments/BookingServiceTest.php +++ b/tests/php/unit/Service/Appointments/BookingServiceTest.php @@ -45,6 +45,7 @@ use OCP\Calendar\ICalendarQuery; use OCP\IUser; use OCP\Security\ISecureRandom; use PHPUnit\Framework\MockObject\MockObject; +use Psr\Log\LoggerInterface; use Safe\DateTimeImmutable; class BookingServiceTest extends TestCase { @@ -73,6 +74,9 @@ class BookingServiceTest extends TestCase { /** @var MailService|MockObject */ private $mailService; + /** @var MockObject|LoggerInterface */ + private $logger; + /** @var BookingService */ private $service; @@ -91,6 +95,7 @@ class BookingServiceTest extends TestCase { $this->bookingCalendarWriter = $this->createMock(BookingCalendarWriter::class); $this->random = $this->createMock(ISecureRandom::class); $this->mailService = $this->createMock(MailService::class); + $this->logger = $this->createMock(LoggerInterface::class); $this->service = new BookingService( $this->availabilityGenerator, $this->extrapolator, @@ -99,7 +104,8 @@ class BookingServiceTest extends TestCase { $this->bookingMapper, $this->bookingCalendarWriter, $this->random, - $this->mailService + $this->mailService, + $this->logger, ); } |