diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2015-04-20 12:31:07 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2015-04-20 12:31:07 +0200 |
commit | 0cf13e9b78be8203b5159e3e53050d134ffe7bfb (patch) | |
tree | aa932a06ac0d38dec2a874033838d2a3c5e70a71 /tests/lib/template | |
parent | 80be3b0c476308571d1b47e71ca66580ec3fd720 (diff) | |
download | nextcloud-server-0cf13e9b78be8203b5159e3e53050d134ffe7bfb.tar.gz nextcloud-server-0cf13e9b78be8203b5159e3e53050d134ffe7bfb.zip |
Fix phpStorm complains and namespace
Diffstat (limited to 'tests/lib/template')
-rw-r--r-- | tests/lib/template/resourcelocator.php | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/tests/lib/template/resourcelocator.php b/tests/lib/template/resourcelocator.php index b0851621fd2..bbcd6876ac8 100644 --- a/tests/lib/template/resourcelocator.php +++ b/tests/lib/template/resourcelocator.php @@ -6,8 +6,12 @@ * See the COPYING-README file. */ -class Test_ResourceLocator extends \Test\TestCase { - /** @var PHPUnit_Framework_MockObject_MockObject */ +namespace Test\Template; + +use OC\Template\ResourceNotFoundException; + +class ResourceLocator extends \Test\TestCase { + /** @var \PHPUnit_Framework_MockObject_MockObject */ protected $logger; protected function setUp() { @@ -17,10 +21,14 @@ class Test_ResourceLocator extends \Test\TestCase { /** * @param string $theme + * @param array $core_map + * @param array $party_map + * @param array $appsRoots + * @return \PHPUnit_Framework_MockObject_MockObject */ - public function getResourceLocator( $theme, $core_map, $party_map, $appsroots ) { + public function getResourceLocator($theme, $core_map, $party_map, $appsRoots) { return $this->getMockForAbstractClass('OC\Template\ResourceLocator', - array($this->logger, $theme, $core_map, $party_map, $appsroots ), + array($this->logger, $theme, $core_map, $party_map, $appsRoots ), '', true, true, true, array()); } @@ -44,6 +52,7 @@ class Test_ResourceLocator extends \Test\TestCase { $locator->expects($this->once()) ->method('doFindTheme') ->with('foo'); + /** @var \OC\Template\ResourceLocator $locator */ $locator->find(array('foo')); } @@ -53,20 +62,22 @@ class Test_ResourceLocator extends \Test\TestCase { $locator->expects($this->once()) ->method('doFind') ->with('foo') - ->will($this->throwException(new \OC\Template\ResourceNotFoundException('foo', 'map'))); + ->will($this->throwException(new ResourceNotFoundException('foo', 'map'))); $locator->expects($this->once()) ->method('doFindTheme') ->with('foo') - ->will($this->throwException(new \OC\Template\ResourceNotFoundException('foo', 'map'))); + ->will($this->throwException(new ResourceNotFoundException('foo', 'map'))); $this->logger->expects($this->exactly(2)) ->method('error'); + /** @var \OC\Template\ResourceLocator $locator */ $locator->find(array('foo')); } public function testAppendIfExist() { $locator = $this->getResourceLocator('theme', array(__DIR__=>'map'), array('3rd'=>'party'), array('foo'=>'bar')); - $method = new ReflectionMethod($locator, 'appendIfExist'); + /** @var \OC\Template\ResourceLocator $locator */ + $method = new \ReflectionMethod($locator, 'appendIfExist'); $method->setAccessible(true); $method->invoke($locator, __DIR__, basename(__FILE__), 'webroot'); |