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
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Template/ResourceLocatorTest.php')
-rw-r--r--tests/lib/Template/ResourceLocatorTest.php30
1 files changed, 15 insertions, 15 deletions
diff --git a/tests/lib/Template/ResourceLocatorTest.php b/tests/lib/Template/ResourceLocatorTest.php
index 90488071b4f..f0fa8186686 100644
--- a/tests/lib/Template/ResourceLocatorTest.php
+++ b/tests/lib/Template/ResourceLocatorTest.php
@@ -29,24 +29,24 @@ class ResourceLocatorTest extends \Test\TestCase {
*/
public function getResourceLocator($theme, $core_map, $party_map, $appsRoots) {
return $this->getMockForAbstractClass('OC\Template\ResourceLocator',
- array($this->logger, $theme, $core_map, $party_map, $appsRoots ),
- '', true, true, true, array());
+ [$this->logger, $theme, $core_map, $party_map, $appsRoots ],
+ '', true, true, true, []);
}
public function testConstructor() {
$locator = $this->getResourceLocator('theme',
- array('core'=>'map'), array('3rd'=>'party'), array('foo'=>'bar'));
+ ['core'=>'map'], ['3rd'=>'party'], ['foo'=>'bar']);
$this->assertAttributeEquals('theme', 'theme', $locator);
$this->assertAttributeEquals('core', 'serverroot', $locator);
- $this->assertAttributeEquals(array('core'=>'map','3rd'=>'party'), 'mapping', $locator);
+ $this->assertAttributeEquals(['core'=>'map','3rd'=>'party'], 'mapping', $locator);
$this->assertAttributeEquals('3rd', 'thirdpartyroot', $locator);
$this->assertAttributeEquals('map', 'webroot', $locator);
- $this->assertAttributeEquals(array(), 'resources', $locator);
+ $this->assertAttributeEquals([], 'resources', $locator);
}
public function testFind() {
$locator = $this->getResourceLocator('theme',
- array('core' => 'map'), array('3rd' => 'party'), array('foo' => 'bar'));
+ ['core' => 'map'], ['3rd' => 'party'], ['foo' => 'bar']);
$locator->expects($this->once())
->method('doFind')
->with('foo');
@@ -54,12 +54,12 @@ class ResourceLocatorTest extends \Test\TestCase {
->method('doFindTheme')
->with('foo');
/** @var \OC\Template\ResourceLocator $locator */
- $locator->find(array('foo'));
+ $locator->find(['foo']);
}
public function testFindNotFound() {
$locator = $this->getResourceLocator('theme',
- array('core'=>'map'), array('3rd'=>'party'), array('foo'=>'bar'));
+ ['core'=>'map'], ['3rd'=>'party'], ['foo'=>'bar']);
$locator->expects($this->once())
->method('doFind')
->with('foo')
@@ -72,25 +72,25 @@ class ResourceLocatorTest extends \Test\TestCase {
->method('debug')
->with($this->stringContains('map/foo'));
/** @var \OC\Template\ResourceLocator $locator */
- $locator->find(array('foo'));
+ $locator->find(['foo']);
}
public function testAppendIfExist() {
$locator = $this->getResourceLocator('theme',
- array(__DIR__=>'map'), array('3rd'=>'party'), array('foo'=>'bar'));
+ [__DIR__=>'map'], ['3rd'=>'party'], ['foo'=>'bar']);
/** @var \OC\Template\ResourceLocator $locator */
$method = new \ReflectionMethod($locator, 'appendIfExist');
$method->setAccessible(true);
$method->invoke($locator, __DIR__, basename(__FILE__), 'webroot');
- $resource1 = array(__DIR__, 'webroot', basename(__FILE__));
- $this->assertEquals(array($resource1), $locator->getResources());
+ $resource1 = [__DIR__, 'webroot', basename(__FILE__)];
+ $this->assertEquals([$resource1], $locator->getResources());
$method->invoke($locator, __DIR__, basename(__FILE__));
- $resource2 = array(__DIR__, 'map', basename(__FILE__));
- $this->assertEquals(array($resource1, $resource2), $locator->getResources());
+ $resource2 = [__DIR__, 'map', basename(__FILE__)];
+ $this->assertEquals([$resource1, $resource2], $locator->getResources());
$method->invoke($locator, __DIR__, 'does-not-exist');
- $this->assertEquals(array($resource1, $resource2), $locator->getResources());
+ $this->assertEquals([$resource1, $resource2], $locator->getResources());
}
}