logger = $this->createMock(LoggerInterface::class); $this->providerManager = $this->createMock(IProviderManager::class); /** @var IDBConnection $connection */ $connection = $this->createMock(IDBConnection::class); $this->manager = new Manager($connection, $this->providerManager, $this->logger); } public function testRegisterResourceProvider(): void { $this->logger->expects($this->once()) ->method('debug') ->with($this->equalTo('\OC\Collaboration\Resources\Manager::registerResourceProvider is deprecated'), $this->equalTo(['provider' => 'AwesomeResourceProvider'])); $this->providerManager->expects($this->once()) ->method('registerResourceProvider') ->with($this->equalTo('AwesomeResourceProvider')); $this->manager->registerResourceProvider('AwesomeResourceProvider'); } }