diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2021-10-14 11:12:55 +0200 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2021-10-14 16:06:51 +0200 |
commit | c75a12c1540b63909e2546733a83a36646c82bd3 (patch) | |
tree | a91e100b9e872b343a06bab167438eac70fc822c /tests/lib/Calendar | |
parent | ed533bd128807ae4e41efb590d59afe05c26668c (diff) | |
download | nextcloud-server-c75a12c1540b63909e2546733a83a36646c82bd3.tar.gz nextcloud-server-c75a12c1540b63909e2546733a83a36646c82bd3.zip |
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.php | 14 |
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 ); } |