Commit 66f94273 authored by Joas Schilling's avatar Joas Schilling
Browse files

Add a lot of users for testing

parent 4fbfe077
......@@ -192,8 +192,22 @@ class Test_Preferences_Object extends PHPUnit_Framework_TestCase {
$query->execute(array('AUser', 'testGetUserValues', 'somekey', 'somevalue'));
$preferences = new OC\Preferences(\OC_DB::getConnection());
$values = $preferences->getValueForUsers('testGetUserValues', 'somekey', array('SomeUser', 'AnotherUser', 'NoValueSet'));
$users = array('SomeUser', 'AnotherUser', 'NoValueSet');
$values = $preferences->getValueForUsers('testGetUserValues', 'somekey', $users);
// Add a lot of users so the array is chunked
for ($i = 1; $i <= 75; $i++) {
array_unshift($users, 'NoValueBefore#' . $i);
array_push($users, 'NoValueAfter#' . $i);
$values = $preferences->getValueForUsers('testGetUserValues', 'somekey', $users);
protected function assertUserValues($values) {
$this->assertEquals(2, sizeof($values));
$this->assertArrayHasKey('SomeUser', $values);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment