aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/ContactsManagerTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/ContactsManagerTest.php')
-rw-r--r--tests/lib/ContactsManagerTest.php14
1 files changed, 8 insertions, 6 deletions
diff --git a/tests/lib/ContactsManagerTest.php b/tests/lib/ContactsManagerTest.php
index 7586b063883..5f7e65312f2 100644
--- a/tests/lib/ContactsManagerTest.php
+++ b/tests/lib/ContactsManagerTest.php
@@ -6,6 +6,8 @@
*/
namespace Test;
+use OC\ContactsManager;
+use OCP\Constants;
use OCP\IAddressBook;
class ContactsManagerTest extends \Test\TestCase {
@@ -14,10 +16,10 @@ class ContactsManagerTest extends \Test\TestCase {
protected function setUp(): void {
parent::setUp();
- $this->cm = new \OC\ContactsManager();
+ $this->cm = new ContactsManager();
}
- public function searchProvider() {
+ public static function searchProvider(): array {
$search1 = [
0 => [
'N' => [0 => '', 1 => 'Jan', 2 => 'Jansen', 3 => '', 4 => '',],
@@ -153,7 +155,7 @@ class ContactsManagerTest extends \Test\TestCase {
$addressbook->expects($this->any())
->method('getPermissions')
- ->willReturn(\OCP\Constants::PERMISSION_ALL);
+ ->willReturn(Constants::PERMISSION_ALL);
$addressbook->expects($this->once())
->method('delete')
@@ -176,7 +178,7 @@ class ContactsManagerTest extends \Test\TestCase {
$addressbook->expects($this->any())
->method('getPermissions')
- ->willReturn(\OCP\Constants::PERMISSION_READ);
+ ->willReturn(Constants::PERMISSION_READ);
$addressbook->expects($this->never())
->method('delete');
@@ -216,7 +218,7 @@ class ContactsManagerTest extends \Test\TestCase {
$addressbook->expects($this->any())
->method('getPermissions')
- ->willReturn(\OCP\Constants::PERMISSION_ALL);
+ ->willReturn(Constants::PERMISSION_ALL);
$addressbook->expects($this->once())
->method('createOrUpdate')
@@ -239,7 +241,7 @@ class ContactsManagerTest extends \Test\TestCase {
$addressbook->expects($this->any())
->method('getPermissions')
- ->willReturn(\OCP\Constants::PERMISSION_READ);
+ ->willReturn(Constants::PERMISSION_READ);
$addressbook->expects($this->never())
->method('createOrUpdate');