Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
Signed-off-by: Tobia De Koninck <[email protected]>
  • Loading branch information
LEDfan committed Feb 10, 2018
1 parent df86a4c commit e8136e4
Show file tree
Hide file tree
Showing 30 changed files with 1,224 additions and 507 deletions.
13 changes: 7 additions & 6 deletions appinfo/application.php
Original file line number Diff line number Diff line change
Expand Up @@ -243,11 +243,13 @@ public function __construct(array $urlParams=array()){
});

$container->registerService('UserProvider', function(IContainer $c) {
if (self::contactsStoreApiSupporetd()) {
if (self::contactsStoreApiSupported()) {
return new ContactsStoreUserProvider(
$c->query('OCP\Contacts\ContactsMenu\IContactsStore'),
$c->query('ServerContainer')->getUserSession(),
$c->query('ServerContainer')->getUserManager()
$c->query('ServerContainer')->getUserManager(),
$c->query('OCP\IGroupManager'),
$c->query('OCP\IConfig')
);
} else {
return new UserManagerUserProvider(
Expand Down Expand Up @@ -343,12 +345,11 @@ static public function santizeUserId($userId) {
}

/**
* @brief whether the ContactsStore API is enabled
* @return bool
* @return bool whether the ContactsStore API is enabled
*/
public static function contactsStoreApiSupporetd() {
public static function contactsStoreApiSupported() {
$version = \OCP\Util::getVersion();
return $version[0] === 13;
return $version[0] >= 13;
}

}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"sabre/uri": "~1.0"
},
"require-dev": {
"phpunit/phpunit": "*.*",
"phpunit/phpunit": "^6.5|^5.7",
"friendsofphp/php-cs-fixer": "^2.4|^2.10"
}
}
Loading

0 comments on commit e8136e4

Please sign in to comment.