aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGary Kim <gary@garykim.dev>2021-06-29 19:20:33 -0400
committerGary Kim <gary@garykim.dev>2021-06-30 15:28:02 -0400
commitb78f3a57d1d05fb5f81ec8361139b64a3e54d7b0 (patch)
treec2051ba8b5b03b8e4152e7597a8a3ac4457980c6 /tests
parent6da9ccc9ee1e37932c6580e9831c74bbeeac741b (diff)
downloadnextcloud-server-b78f3a57d1d05fb5f81ec8361139b64a3e54d7b0.tar.gz
nextcloud-server-b78f3a57d1d05fb5f81ec8361139b64a3e54d7b0.zip
Migrate HintException to OCP
Signed-off-by: Gary Kim <gary@garykim.dev>
Diffstat (limited to 'tests')
-rw-r--r--tests/Core/Controller/ChangePasswordControllerTest.php2
-rw-r--r--tests/lib/Memcache/FactoryTest.php2
-rw-r--r--tests/lib/Share20/ManagerTest.php2
-rw-r--r--tests/lib/User/DatabaseTest.php6
4 files changed, 6 insertions, 6 deletions
diff --git a/tests/Core/Controller/ChangePasswordControllerTest.php b/tests/Core/Controller/ChangePasswordControllerTest.php
index dfd65aed47f..190afd3be47 100644
--- a/tests/Core/Controller/ChangePasswordControllerTest.php
+++ b/tests/Core/Controller/ChangePasswordControllerTest.php
@@ -22,11 +22,11 @@
namespace Tests\Core\Controller;
-use OC\HintException;
use OC\User\Session;
use OCA\Settings\Controller\ChangePasswordController;
use OCP\App\IAppManager;
use OCP\AppFramework\Http\JSONResponse;
+use OCP\HintException;
use OCP\IGroupManager;
use OCP\IL10N;
use OCP\IRequest;
diff --git a/tests/lib/Memcache/FactoryTest.php b/tests/lib/Memcache/FactoryTest.php
index 19edf4aa3dd..858bdc5d3ef 100644
--- a/tests/lib/Memcache/FactoryTest.php
+++ b/tests/lib/Memcache/FactoryTest.php
@@ -129,7 +129,7 @@ class FactoryTest extends \Test\TestCase {
* @dataProvider cacheUnavailableProvider
*/
public function testCacheNotAvailableException($localCache, $distributedCache) {
- $this->expectException(\OC\HintException::class);
+ $this->expectException(\OCP\HintException::class);
$logger = $this->getMockBuilder(ILogger::class)->getMock();
new \OC\Memcache\Factory('abc', $logger, $localCache, $distributedCache);
diff --git a/tests/lib/Share20/ManagerTest.php b/tests/lib/Share20/ManagerTest.php
index 117adc95186..de8dc9fcc86 100644
--- a/tests/lib/Share20/ManagerTest.php
+++ b/tests/lib/Share20/ManagerTest.php
@@ -22,7 +22,6 @@
namespace Test\Share20;
use OC\Files\Mount\MoveableMount;
-use OC\HintException;
use OC\Share20\DefaultShareProvider;
use OC\Share20\Exception;
use OC\Share20\Manager;
@@ -36,6 +35,7 @@ use OCP\Files\Mount\IMountManager;
use OCP\Files\Mount\IMountPoint;
use OCP\Files\Node;
use OCP\Files\Storage;
+use OCP\HintException;
use OCP\IConfig;
use OCP\IGroup;
use OCP\IGroupManager;
diff --git a/tests/lib/User/DatabaseTest.php b/tests/lib/User/DatabaseTest.php
index 6eb4466c69d..49b691cf9bc 100644
--- a/tests/lib/User/DatabaseTest.php
+++ b/tests/lib/User/DatabaseTest.php
@@ -22,10 +22,10 @@
namespace Test\User;
-use OC\HintException;
use OC\User\User;
use OCP\EventDispatcher\Event;
use OCP\EventDispatcher\IEventDispatcher;
+use OCP\HintException;
use OCP\Security\Events\ValidatePasswordPolicyEvent;
use PHPUnit\Framework\MockObject\MockObject;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
@@ -82,9 +82,9 @@ class DatabaseTest extends Backend {
$this->assertSame($user, $this->backend->checkPassword($user, 'newpass'));
}
-
+
public function testVerifyPasswordEventFail() {
- $this->expectException(\OC\HintException::class);
+ $this->expectException(\OCP\HintException::class);
$this->expectExceptionMessage('password change failed');
$user = $this->getUser();