Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2020-07-23 14:44:18 +0300
committerMorris Jobke <hey@morrisjobke.de>2020-07-30 14:19:16 +0300
commit3ab2e4d41c15252f824f989a8e23f6bb8957dfb9 (patch)
tree494dec59f11cdb6fba8747c49d624be78f01e8d1 /tests
parent67f22e28da1fe4e6c409991a4ac7e7c0cb6747c9 (diff)
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>
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/Template/CSSResourceLocatorTest.php10
-rw-r--r--tests/lib/Template/JSResourceLocatorTest.php11
-rw-r--r--tests/lib/Template/ResourceLocatorTest.php11
3 files changed, 0 insertions, 32 deletions
diff --git a/tests/lib/Template/CSSResourceLocatorTest.php b/tests/lib/Template/CSSResourceLocatorTest.php
index 7c9f3585038..47f3347bb6f 100644
--- a/tests/lib/Template/CSSResourceLocatorTest.php
+++ b/tests/lib/Template/CSSResourceLocatorTest.php
@@ -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();
diff --git a/tests/lib/Template/JSResourceLocatorTest.php b/tests/lib/Template/JSResourceLocatorTest.php
index 38c5fc0eadd..e4c8a11820c 100644
--- a/tests/lib/Template/JSResourceLocatorTest.php
+++ b/tests/lib/Template/JSResourceLocatorTest.php
@@ -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();
diff --git a/tests/lib/Template/ResourceLocatorTest.php b/tests/lib/Template/ResourceLocatorTest.php
index 90488071b4f..392d21ae204 100644
--- a/tests/lib/Template/ResourceLocatorTest.php
+++ b/tests/lib/Template/ResourceLocatorTest.php
@@ -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'));