summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-01-28 15:01:30 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-02-02 10:56:33 +0100
commitb01d50216e5169e0bafd5da667f9f76bb54f3cd4 (patch)
treea9400b1dcebe80a6e5272ca1c45c502ebaad44c0 /tests
parent4777f78187cb758413db1b11f11ccb9304f12482 (diff)
downloadnextcloud-server-b01d50216e5169e0bafd5da667f9f76bb54f3cd4.tar.gz
nextcloud-server-b01d50216e5169e0bafd5da667f9f76bb54f3cd4.zip
The local address book is replaced now by the system addressbook as part of the dav app
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/contacts/localadressbook.php114
1 files changed, 0 insertions, 114 deletions
diff --git a/tests/lib/contacts/localadressbook.php b/tests/lib/contacts/localadressbook.php
deleted file mode 100644
index ad3c088e3cd..00000000000
--- a/tests/lib/contacts/localadressbook.php
+++ /dev/null
@@ -1,114 +0,0 @@
-<?php
-use OC\Contacts\LocalAddressBook;
-use OCP\IUser;
-
-/**
- * ownCloud
- *
- * @author Thomas Müller
- * @copyright 2014 Thomas Müller thomas.mueller@tmit.eu
- *
- * You should have received a copy of the GNU Affero General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- */
-
-class Test_LocalAddressBook extends \Test\TestCase
-{
-
- public function testSearchFN() {
- $stub = $this->getMockForAbstractClass('\OCP\IUserManager', array('searchDisplayName'));
-
- $stub->expects($this->any())->method('searchDisplayName')->will($this->returnValue(array(
- new SimpleUserForTesting('tom', 'Thomas'),
- new SimpleUserForTesting('tomtom', 'Thomas T.'),
- )));
-
- $localAddressBook = new LocalAddressBook($stub);
-
- $result = $localAddressBook->search('tom', array('FN'), array());
- $this->assertEquals(2, count($result));
- }
-
- public function testSearchId() {
- $stub = $this->getMockForAbstractClass('\OCP\IUserManager', array('searchDisplayName'));
-
- $stub->expects($this->any())->method('search')->will($this->returnValue(array(
- new SimpleUserForTesting('tom', 'Thomas'),
- new SimpleUserForTesting('tomtom', 'Thomas T.'),
- )));
-
- $localAddressBook = new LocalAddressBook($stub);
-
- $result = $localAddressBook->search('tom', array('id'), array());
- $this->assertEquals(2, count($result));
- }
-}
-
-
-class SimpleUserForTesting implements IUser {
-
- private $uid;
- private $displayName;
-
- public function __construct($uid, $displayName) {
-
- $this->uid = $uid;
- $this->displayName = $displayName;
- }
-
- public function getUID() {
- return $this->uid;
- }
-
- public function getDisplayName() {
- return $this->displayName;
- }
-
- public function setDisplayName($displayName) {
- }
-
- public function getLastLogin() {
- }
-
- public function updateLastLoginTimestamp() {
- }
-
- public function delete() {
- }
-
- public function setPassword($password, $recoveryPassword = null) {
- }
-
- public function getHome() {
- }
-
- public function getBackendClassName() {
- }
-
- public function canChangeAvatar() {
- }
-
- public function canChangePassword() {
- }
-
- public function canChangeDisplayName() {
- }
-
- public function isEnabled() {
- }
-
- public function setEnabled($enabled) {
- }
-
- public function getEMailAddress() {
- }
-
- public function getAvatarImage($size) {
- }
-
- public function getCloudId() {
- }
-
- public function setEMailAddress($mailAddress) {
- }
-}