mirror of
https://github.com/nextcloud/server.git
synced 2026-06-12 10:10:49 -04:00
Remove deprecated test of internal attributes via assertAttributeEquals in constructor tests
I removed the tests completely because they just test that the constructor assigns the values to the internal properties. Nothing that should be cared about from the outside. See https://github.com/sebastianbergmann/phpunit/issues/3339#issuecomment-428843322 It is seen as bad practice to test internal stuff of objects instead of the actual input and output of mathod calls. Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
parent
67f22e28da
commit
3ab2e4d41c
3 changed files with 0 additions and 32 deletions
|
|
@ -107,16 +107,6 @@ class CSSResourceLocatorTest extends \Test\TestCase {
|
|||
return sha1(uniqid(mt_rand(), true));
|
||||
}
|
||||
|
||||
public function testConstructor() {
|
||||
$locator = $this->cssResourceLocator();
|
||||
$this->assertAttributeEquals('theme', 'theme', $locator);
|
||||
$this->assertAttributeEquals('core', 'serverroot', $locator);
|
||||
$this->assertAttributeEquals(array('core'=>'map','3rd'=>'party'), 'mapping', $locator);
|
||||
$this->assertAttributeEquals('3rd', 'thirdpartyroot', $locator);
|
||||
$this->assertAttributeEquals('map', 'webroot', $locator);
|
||||
$this->assertAttributeEquals(array(), 'resources', $locator);
|
||||
}
|
||||
|
||||
public function testFindWithAppPathSymlink() {
|
||||
// First create new apps path, and a symlink to it
|
||||
$apps_dirname = $this->randomString();
|
||||
|
|
|
|||
|
|
@ -86,17 +86,6 @@ class JSResourceLocatorTest extends \Test\TestCase {
|
|||
return sha1(uniqid(mt_rand(), true));
|
||||
}
|
||||
|
||||
|
||||
public function testConstructor() {
|
||||
$locator = $this->jsResourceLocator();
|
||||
$this->assertAttributeEquals('theme', 'theme', $locator);
|
||||
$this->assertAttributeEquals('core', 'serverroot', $locator);
|
||||
$this->assertAttributeEquals(array('core'=>'map','3rd'=>'party'), 'mapping', $locator);
|
||||
$this->assertAttributeEquals('3rd', 'thirdpartyroot', $locator);
|
||||
$this->assertAttributeEquals('map', 'webroot', $locator);
|
||||
$this->assertAttributeEquals(array(), 'resources', $locator);
|
||||
}
|
||||
|
||||
public function testFindWithAppPathSymlink() {
|
||||
// First create new apps path, and a symlink to it
|
||||
$apps_dirname = $this->randomString();
|
||||
|
|
|
|||
|
|
@ -33,17 +33,6 @@ class ResourceLocatorTest extends \Test\TestCase {
|
|||
'', true, true, true, array());
|
||||
}
|
||||
|
||||
public function testConstructor() {
|
||||
$locator = $this->getResourceLocator('theme',
|
||||
array('core'=>'map'), array('3rd'=>'party'), array('foo'=>'bar'));
|
||||
$this->assertAttributeEquals('theme', 'theme', $locator);
|
||||
$this->assertAttributeEquals('core', 'serverroot', $locator);
|
||||
$this->assertAttributeEquals(array('core'=>'map','3rd'=>'party'), 'mapping', $locator);
|
||||
$this->assertAttributeEquals('3rd', 'thirdpartyroot', $locator);
|
||||
$this->assertAttributeEquals('map', 'webroot', $locator);
|
||||
$this->assertAttributeEquals(array(), 'resources', $locator);
|
||||
}
|
||||
|
||||
public function testFind() {
|
||||
$locator = $this->getResourceLocator('theme',
|
||||
array('core' => 'map'), array('3rd' => 'party'), array('foo' => 'bar'));
|
||||
|
|
|
|||
Loading…
Reference in a new issue