Fix unit tests
This commit is contained in:
parent
a037c10c88
commit
d022b6fad4
|
@ -21,20 +21,19 @@ class AutoLoader extends TestCase {
|
||||||
|
|
||||||
public function testLeadingSlashOnClassName() {
|
public function testLeadingSlashOnClassName() {
|
||||||
$this->assertEquals([
|
$this->assertEquals([
|
||||||
\OC::$SERVERROOT . '/lib/private/files/storage/local.php',
|
\OC::$SERVERROOT . '/lib/public/files/storage/local.php',
|
||||||
], $this->loader->findClass('\OC\Files\Storage\Local'));
|
], $this->loader->findClass('\OCP\Files\Storage\Local'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testNoLeadingSlashOnClassName() {
|
public function testNoLeadingSlashOnClassName() {
|
||||||
$this->assertEquals([
|
$this->assertEquals([
|
||||||
\OC::$SERVERROOT . '/lib/private/files/storage/local.php',
|
\OC::$SERVERROOT . '/lib/public/files/storage/local.php',
|
||||||
], $this->loader->findClass('OC\Files\Storage\Local'));
|
], $this->loader->findClass('OCP\Files\Storage\Local'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testLegacyPath() {
|
public function testLegacyPath() {
|
||||||
$this->assertEquals([
|
$this->assertEquals([
|
||||||
\OC::$SERVERROOT . '/lib/private/legacy/files.php',
|
\OC::$SERVERROOT . '/lib/private/legacy/files.php',
|
||||||
\OC::$SERVERROOT . '/lib/private/files.php',
|
|
||||||
], $this->loader->findClass('OC_Files'));
|
], $this->loader->findClass('OC_Files'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,16 +49,9 @@ class AutoLoader extends TestCase {
|
||||||
], $this->loader->findClass('Test_Foo_Bar'));
|
], $this->loader->findClass('Test_Foo_Bar'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testLoadCoreNamespace() {
|
|
||||||
$this->assertEquals([
|
|
||||||
\OC::$SERVERROOT . '/lib/private/foo/bar.php',
|
|
||||||
], $this->loader->findClass('OC\Foo\Bar'));
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testLoadCore() {
|
public function testLoadCore() {
|
||||||
$this->assertEquals([
|
$this->assertEquals([
|
||||||
\OC::$SERVERROOT . '/lib/private/legacy/foo/bar.php',
|
\OC::$SERVERROOT . '/lib/private/legacy/foo/bar.php',
|
||||||
\OC::$SERVERROOT . '/lib/private/foo/bar.php',
|
|
||||||
], $this->loader->findClass('OC_Foo_Bar'));
|
], $this->loader->findClass('OC_Foo_Bar'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,10 +75,4 @@ class AutoLoader extends TestCase {
|
||||||
public function testLoadCoreNamespaceSettings() {
|
public function testLoadCoreNamespaceSettings() {
|
||||||
$this->assertEquals([], $this->loader->findClass('OC\Settings\Foo\Bar'));
|
$this->assertEquals([], $this->loader->findClass('OC\Settings\Foo\Bar'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testLoadCoreNamespaceRepair() {
|
|
||||||
$this->assertEquals([
|
|
||||||
\OC::$SERVERROOT . '/lib/private/repair/foo/bar.php',
|
|
||||||
], $this->loader->findClass('OC\Repair\Foo\Bar'));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue