diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2018-03-19 16:01:07 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-19 16:01:07 +0300 |
commit | 82102c6f18d003fc2752014152b79f78d77869c3 (patch) | |
tree | da8101a74623e22918b2d3075fd63e4d42b2eb4a /tests/unit/Controller | |
parent | 1df4ef8f2beac00e75e76bce495efc8f409c312c (diff) | |
parent | 02cde8030b9381c586fd42613fd170eab2b0ab37 (diff) |
Merge pull request #196 from nextcloud/multiple-user-back-ends
Multiple user back ends
Diffstat (limited to 'tests/unit/Controller')
-rw-r--r-- | tests/unit/Controller/SAMLControllerTest.php | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/unit/Controller/SAMLControllerTest.php b/tests/unit/Controller/SAMLControllerTest.php index def38c1f..f2ae402f 100644 --- a/tests/unit/Controller/SAMLControllerTest.php +++ b/tests/unit/Controller/SAMLControllerTest.php @@ -458,4 +458,27 @@ class SAMLControllerTest extends TestCase { ['messageSend' => 'test message', 'messageExpected' => 'test message'], ]; } + + /** + * @dataProvider dataTestGetSSODisplayName + * + * @param string $configuredDisplayName + * @param string $expected + */ + public function testGetSSODisplayName($configuredDisplayName, $expected) { + $this->config->expects($this->any())->method('getAppValue') + ->with('user_saml', 'general-idp0_display_name') + ->willReturn($configuredDisplayName); + + $result = $this->invokePrivate($this->samlController, 'getSSODisplayName'); + + $this->assertSame($expected, $result); + } + + public function dataTestGetSSODisplayName() { + return [ + ['My identity provider', 'My identity provider'], + ['', 'SSO & SAML log in'] + ]; + } } |