summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-08-09 22:08:02 +0200
committerGitHub <noreply@github.com>2017-08-09 22:08:02 +0200
commit3b955a16252a4581251368638038da11812fa94c (patch)
tree251257a05962eeebf645a2ed3e141ce9b4af5c9e /apps
parente08768ee04635d017a3f2f87e7ac6b1859f733dc (diff)
parentc6f6413bb195f043e6054bc8b38dedcf1bfdf6cc (diff)
downloadnextcloud-server-3b955a16252a4581251368638038da11812fa94c.tar.gz
nextcloud-server-3b955a16252a4581251368638038da11812fa94c.zip
Merge pull request #5791 from nextcloud/add-php7.2-tests
[CI] Add PHP 7.2 testing container
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/tests/CacheTest.php4
-rw-r--r--apps/user_ldap/tests/User/UserTest.php2
-rw-r--r--apps/user_ldap/tests/User_LDAPTest.php9
3 files changed, 13 insertions, 2 deletions
diff --git a/apps/files_sharing/tests/CacheTest.php b/apps/files_sharing/tests/CacheTest.php
index 26ba5b21e46..82f4ad62f67 100644
--- a/apps/files_sharing/tests/CacheTest.php
+++ b/apps/files_sharing/tests/CacheTest.php
@@ -243,7 +243,7 @@ class CacheTest extends TestCase {
$id2 = $this->sharedCache->get('subdir/another too.txt')['fileid'];
$id3 = $this->sharedCache->get('subdir/not a text file.xml')['fileid'];
$id4 = $this->sharedCache->get('subdir/another.txt')['fileid'];
- $tagManager = \OC::$server->getTagManager()->load('files', null, null, $userId);
+ $tagManager = \OC::$server->getTagManager()->load('files', [], false, $userId);
$tagManager->tagAs($id1, 'tag1');
$tagManager->tagAs($id1, 'tag2');
$tagManager->tagAs($id2, 'tag1');
@@ -285,7 +285,7 @@ class CacheTest extends TestCase {
$this->sharedCache->get('subdir/emptydir')['fileid'],
$this->sharedCache->get('subdir/emptydir2')['fileid'],
);
- $tagManager = \OC::$server->getTagManager()->load('files', null, null, $userId);
+ $tagManager = \OC::$server->getTagManager()->load('files', [], false, $userId);
foreach ($allIds as $id) {
$tagManager->tagAs($id, 'tag1');
}
diff --git a/apps/user_ldap/tests/User/UserTest.php b/apps/user_ldap/tests/User/UserTest.php
index 0437051b134..f48abc9ce4a 100644
--- a/apps/user_ldap/tests/User/UserTest.php
+++ b/apps/user_ldap/tests/User/UserTest.php
@@ -1269,6 +1269,7 @@ class UserTest extends \Test\TestCase {
return array(
array(
'pwdchangedtime' => array((new \DateTime())->sub(new \DateInterval('P28D'))->format('Ymdhis').'Z'),
+ 'pwdgraceusetime' => [],
),
);
}
@@ -1342,6 +1343,7 @@ class UserTest extends \Test\TestCase {
array(
'pwdpolicysubentry' => array('cn=custom,ou=policies,dc=foo,dc=bar'),
'pwdchangedtime' => array((new \DateTime())->sub(new \DateInterval('P28D'))->format('Ymdhis').'Z'),
+ 'pwdgraceusetime' => [],
)
);
}
diff --git a/apps/user_ldap/tests/User_LDAPTest.php b/apps/user_ldap/tests/User_LDAPTest.php
index aaf67ebcab6..ced5009148d 100644
--- a/apps/user_ldap/tests/User_LDAPTest.php
+++ b/apps/user_ldap/tests/User_LDAPTest.php
@@ -135,6 +135,9 @@ class User_LDAPTest extends TestCase {
return false;
}
}));
+
+ $access->method('fetchUsersByLoginName')
+ ->willReturn([]);
}
/**
@@ -353,6 +356,9 @@ class User_LDAPTest extends TestCase {
$access->expects($this->any())
->method('nextcloudUserNames')
->will($this->returnArgument(0));
+
+ $access->method('fetchUsersByLoginName')
+ ->willReturn([]);
}
public function testGetUsersNoParam() {
@@ -760,6 +766,9 @@ class User_LDAPTest extends TestCase {
$access->expects($this->any())
->method('getUserMapper')
->will($this->returnValue($userMapper));
+
+ $access->method('fetchUsersByLoginName')
+ ->willReturn([]);
}
public function testGetDisplayName() {