Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/user_saml.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorbne86 <b.von.st.vieth@fz-juelich.de>2017-03-10 18:27:45 +0300
committerSérgio Faria <sergio.faria@is4health.com>2018-03-19 19:07:33 +0300
commit18aa824206c1ed75a76fac6440357179c23b5d1d (patch)
treedf5f7ca7aea0a9cfce23fe1eab3e88c76df6315d /tests
parentee38ad3a179c9a12dbc22c0d58220476aad59709 (diff)
first version for group-mapping. groups are added and user assigned to groups. until now no group removal
Signed-off-by: bne86 <b.von.st.vieth@fz-juelich.de>
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/Settings/AdminTest.php5
-rw-r--r--tests/unit/UserBackendTest.php10
2 files changed, 13 insertions, 2 deletions
diff --git a/tests/unit/Settings/AdminTest.php b/tests/unit/Settings/AdminTest.php
index e42ebcd9..8a189d48 100644
--- a/tests/unit/Settings/AdminTest.php
+++ b/tests/unit/Settings/AdminTest.php
@@ -120,6 +120,11 @@ class AdminTest extends \Test\TestCase {
'type' => 'line',
'required' => false,
],
+ 'group_mapping' => [
+ 'text' => $this->l10n->t('Attribute to map the users groups to.'),
+ 'type' => 'line',
+ 'required' => true,
+ ],
];
$params = [
diff --git a/tests/unit/UserBackendTest.php b/tests/unit/UserBackendTest.php
index 81ea0660..36b975f3 100644
--- a/tests/unit/UserBackendTest.php
+++ b/tests/unit/UserBackendTest.php
@@ -24,6 +24,7 @@ namespace OCA\User_SAML\Tests\Settings;
use OCA\User_SAML\UserBackend;
use OCP\IConfig;
use OCP\IDBConnection;
+use OCP\IGroupManager;
use OCP\ISession;
use OCP\IURLGenerator;
use OCP\IUser;
@@ -42,6 +43,8 @@ class UserBackendTest extends TestCase {
private $db;
/** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */
private $userManager;
+ /** @var IGroupManager|\PHPUnit_Framework_MockObject_MockObject */
+ private $groupManager;
/** @var UserBackend|\PHPUnit_Framework_MockObject_MockObject */
private $userBackend;
@@ -53,6 +56,7 @@ class UserBackendTest extends TestCase {
$this->session = $this->createMock(ISession::class);
$this->db = $this->createMock(IDBConnection::class);
$this->userManager = $this->createMock(IUserManager::class);
+ $this->groupManager = $this->createMock(IGroupManager::class);
}
public function getMockedBuilder(array $mockedFunctions = []) {
@@ -63,7 +67,8 @@ class UserBackendTest extends TestCase {
$this->urlGenerator,
$this->session,
$this->db,
- $this->userManager
+ $this->userManager,
+ $this->groupManager
])
->setMethods($mockedFunctions)
->getMock();
@@ -73,7 +78,8 @@ class UserBackendTest extends TestCase {
$this->urlGenerator,
$this->session,
$this->db,
- $this->userManager
+ $this->userManager,
+ $this->groupManager
);
}
}