diff options
author | Julius Haertl <jus@bitgrid.net> | 2016-11-04 18:55:00 +0100 |
---|---|---|
committer | Julius Haertl <jus@bitgrid.net> | 2016-11-18 10:23:25 +0100 |
commit | 78de213b8582f160b9e3acd1d921a6dd1ccd88d9 (patch) | |
tree | ef7374ebd57633a9e6f7af8f8880d0134bbae890 /apps/theming/tests/Controller | |
parent | 3a400f92d1936b2b752d813cbb27632d6acb9904 (diff) | |
download | nextcloud-server-78de213b8582f160b9e3acd1d921a6dd1ccd88d9.tar.gz nextcloud-server-78de213b8582f160b9e3acd1d921a6dd1ccd88d9.zip |
Sanitize input and small fixes
Signed-off-by: Julius Haertl <jus@bitgrid.net>
Diffstat (limited to 'apps/theming/tests/Controller')
-rw-r--r-- | apps/theming/tests/Controller/IconControllerTest.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/apps/theming/tests/Controller/IconControllerTest.php b/apps/theming/tests/Controller/IconControllerTest.php index 69bbfa0e45e..b1742db018f 100644 --- a/apps/theming/tests/Controller/IconControllerTest.php +++ b/apps/theming/tests/Controller/IconControllerTest.php @@ -30,7 +30,6 @@ use OCP\AppFramework\Http\DataDisplayResponse; use OCP\Files\IRootFolder; use OCP\Files\NotFoundException; use OCP\IConfig; -use OCP\IL10N; use OCP\IRequest; use Test\TestCase; use OCA\Theming\Util; @@ -47,7 +46,7 @@ class IconControllerTest extends TestCase { private $util; /** @var \OCP\AppFramework\Utility\ITimeFactory */ private $timeFactory; - /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IconController|\PHPUnit_Framework_MockObject_MockObject */ private $iconController; /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */ private $config; @@ -110,8 +109,6 @@ class IconControllerTest extends TestCase { $expected->addHeader('Expires', $expires->format(\DateTime::RFC2822)); $expected->addHeader('Pragma', 'cache'); @$this->assertEquals($expected, $this->iconController->getThemedIcon('core', 'filetypes/folder.svg')); - - } public function testGetFaviconDefault() { @@ -152,7 +149,8 @@ class IconControllerTest extends TestCase { $this->themingDefaults->expects($this->any()) ->method('shouldReplaceIcons') ->willReturn(false); - $expected = new DataDisplayResponse(null, Http::STATUS_NOT_FOUND); + $expected = new Http\Response(); + $expected->setStatus(Http::STATUS_NOT_FOUND); $expected->cacheFor(0); $expected->setLastModified(new \DateTime('now', new \DateTimeZone('GMT'))); $this->assertEquals($expected, $this->iconController->getFavicon()); @@ -196,7 +194,8 @@ class IconControllerTest extends TestCase { $this->themingDefaults->expects($this->any()) ->method('shouldReplaceIcons') ->willReturn(false); - $expected = new DataDisplayResponse(null, Http::STATUS_NOT_FOUND); + $expected = new Http\Response(); + $expected->setStatus(Http::STATUS_NOT_FOUND); $expected->cacheFor(0); $expected->setLastModified(new \DateTime('now', new \DateTimeZone('GMT'))); $this->assertEquals($expected, $this->iconController->getTouchIcon()); |