Test legacy backend with no dependency check

This commit is contained in:
Robin McCorkell 2015-09-01 10:29:49 +01:00
parent cd506f210d
commit 23e4b6e0c2
1 changed files with 18 additions and 0 deletions

View File

@ -92,4 +92,22 @@ class LegacyBackendTest extends \Test\TestCase {
$this->assertEquals(DefinitionParameter::FLAG_OPTIONAL, $parameters['optionalpassword']->getFlags());
}
public function testNoDependencies() {
$auth = $this->getMockBuilder('\OCA\Files_External\Lib\Auth\Builtin')
->disableOriginalConstructor()
->getMock();
$class = '\OCA\Files_External\Tests\Backend\LegacyBackendTest';
$definition = [
'configuration' => [
],
'backend' => 'Backend text',
];
$backend = new LegacyBackend($class, $definition, $auth);
$dependencies = $backend->checkDependencies();
$this->assertCount(0, $dependencies);
}
}