Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2021-10-14 12:12:55 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2021-10-14 17:06:51 +0300
commitc75a12c1540b63909e2546733a83a36646c82bd3 (patch)
treea91e100b9e872b343a06bab167438eac70fc822c /tests/lib/Calendar
parented533bd128807ae4e41efb590d59afe05c26668c (diff)
Build instances of the calendar providers before using them
What we get from the registration context are only the class names. We still have to load the classes before we can use them. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'tests/lib/Calendar')
-rw-r--r--tests/lib/Calendar/ManagerTest.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/lib/Calendar/ManagerTest.php b/tests/lib/Calendar/ManagerTest.php
index 70f7dbe2437..a4d9d45fdb2 100644
--- a/tests/lib/Calendar/ManagerTest.php
+++ b/tests/lib/Calendar/ManagerTest.php
@@ -27,6 +27,8 @@ use OC\AppFramework\Bootstrap\Coordinator;
use OC\Calendar\Manager;
use OCP\Calendar\ICalendar;
use PHPUnit\Framework\MockObject\MockObject;
+use Psr\Container\ContainerInterface;
+use Psr\Log\LoggerInterface;
use Test\TestCase;
class ManagerTest extends TestCase {
@@ -34,6 +36,12 @@ class ManagerTest extends TestCase {
/** @var Coordinator|MockObject */
private $coordinator;
+ /** @var MockObject|ContainerInterface */
+ private $container;
+
+ /** @var MockObject|LoggerInterface */
+ private $logger;
+
/** @var Manager */
private $manager;
@@ -41,9 +49,13 @@ class ManagerTest extends TestCase {
parent::setUp();
$this->coordinator = $this->createMock(Coordinator::class);
+ $this->container = $this->createMock(ContainerInterface::class);
+ $this->logger = $this->createMock(LoggerInterface::class);
$this->manager = new Manager(
- $this->coordinator
+ $this->coordinator,
+ $this->container,
+ $this->logger
);
}