diff options
Diffstat (limited to 'tests/Core')
-rw-r--r-- | tests/Core/Controller/ChangePasswordControllerTest.php | 4 | ||||
-rw-r--r-- | tests/Core/Controller/OCSControllerTest.php | 6 | ||||
-rw-r--r-- | tests/Core/Templates/TemplatesTest.php | 20 |
3 files changed, 5 insertions, 25 deletions
diff --git a/tests/Core/Controller/ChangePasswordControllerTest.php b/tests/Core/Controller/ChangePasswordControllerTest.php index c426bae9974..ea3abb58e2f 100644 --- a/tests/Core/Controller/ChangePasswordControllerTest.php +++ b/tests/Core/Controller/ChangePasswordControllerTest.php @@ -50,9 +50,9 @@ class ChangePasswordControllerTest extends \Test\TestCase { public function setUp() { parent::setUp(); - $this->userManager = $this->createMock(IUserManager::class); + $this->userManager = $this->createMock(\OC\User\Manager::class); $this->userSession = $this->createMock(Session::class); - $this->groupManager = $this->createMock(IGroupManager::class); + $this->groupManager = $this->createMock(\OC\Group\Manager::class); $this->appManager = $this->createMock(IAppManager::class); $this->l = $this->createMock(IL10N::class); $this->l->method('t')->will($this->returnArgument(0)); diff --git a/tests/Core/Controller/OCSControllerTest.php b/tests/Core/Controller/OCSControllerTest.php index 9d0a3dae118..aa2c780f82e 100644 --- a/tests/Core/Controller/OCSControllerTest.php +++ b/tests/Core/Controller/OCSControllerTest.php @@ -169,7 +169,7 @@ class OCSControllerTest extends TestCase { $this->equalTo('wrongpass') )->willReturn(false); - $expected = new DataResponse(null, 102); + $expected = new DataResponse([], 102); $expected->throttle(); $this->assertEquals($expected, $this->controller->personCheck('user', 'wrongpass')); } @@ -181,7 +181,7 @@ class OCSControllerTest extends TestCase { $this->equalTo('wrongpass') )->willReturn(false); - $expected = new DataResponse(null, 101); + $expected = new DataResponse([], 101); $this->assertEquals($expected, $this->controller->personCheck('', '')); } @@ -192,7 +192,7 @@ class OCSControllerTest extends TestCase { ->with('NotExistingUser') ->willReturn(null); - $expected = new DataResponse('User not found', 404); + $expected = new DataResponse(['User not found'], 404); $this->assertEquals($expected, $this->controller->getIdentityProof('NotExistingUser')); } diff --git a/tests/Core/Templates/TemplatesTest.php b/tests/Core/Templates/TemplatesTest.php deleted file mode 100644 index cd1502fd22c..00000000000 --- a/tests/Core/Templates/TemplatesTest.php +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -namespace Tests\Core\Templates; - -class TemplatesTest extends \Test\TestCase { - - public function test403() { - $template = \OC::$SERVERROOT . '/core/templates/403.php'; - $expectedHtml = "<ul><li class='error'>\n\t\tAccess forbidden<br><p class='hint'></p></li></ul>"; - $this->assertTemplate($expectedHtml, $template); - } - - public function test404() { - $template = \OC::$SERVERROOT . '/core/templates/404.php'; - $href = \OC::$server->getURLGenerator()->linkTo('', 'index.php'); - $expectedHtml = "<ul><li class='error'>\n\t\t\tFile not found<br><p class='hint'>The specified document has not been found on the server.</p>\n<p class='hint'><a href='$href'>You can click here to return to Nextcloud.</a></p>\n\t\t</li></ul>"; - $this->assertTemplate($expectedHtml, $template); - } - -} |