[Pkg-owncloud-commits] [owncloud] 99/165: Fix phpStorm complains and namespace
David Prévot
taffit at moszumanska.debian.org
Thu Apr 23 04:06:39 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch stable8
in repository owncloud.
commit 0cf13e9b78be8203b5159e3e53050d134ffe7bfb
Author: Joas Schilling <nickvergessen at owncloud.com>
Date: Mon Apr 20 12:31:07 2015 +0200
Fix phpStorm complains and namespace
---
tests/lib/template/resourcelocator.php | 25 ++++++++++++++++++-------
1 file changed, 18 insertions(+), 7 deletions(-)
diff --git a/tests/lib/template/resourcelocator.php b/tests/lib/template/resourcelocator.php
index b085162..bbcd687 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');
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list