diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2022-05-24 14:04:22 +0300 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2022-05-24 14:09:27 +0300 |
commit | 68f9c58314b44bbf407eb38af9443f4a9683c241 (patch) | |
tree | dae87bebd278238e0fefab7c00deb32f36b1aa6a /tests | |
parent | 96b197206e925ab8962365305b165525d38029f4 (diff) |
adjust test
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/Settings/AdminTest.php | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/tests/unit/Settings/AdminTest.php b/tests/unit/Settings/AdminTest.php index 6c3eae07..b7be3df2 100644 --- a/tests/unit/Settings/AdminTest.php +++ b/tests/unit/Settings/AdminTest.php @@ -237,17 +237,25 @@ class AdminTest extends \Test\TestCase { 2 => 'Provider 2', ]); $this->config - ->expects($this->once()) + ->expects($this->exactly(4)) # mode + three global values ->method('getAppValue') - ->with('user_saml', 'type') - ->willReturn('saml'); + ->withConsecutive( + ['user_saml', 'type'], + ['user_saml', 'general-require_provisioned_account'], + ['user_saml', 'general-use_saml_auth_for_desktop'], + ['user_saml', 'general-allow_multiple_user_back_ends'], + ) + ->willReturnOnConsecutiveCalls('saml', 0, 0, ''); $this->defaults - ->expects($this->once()) + ->expects($this->any()) ->method('getName') ->willReturn('Nextcloud'); $params = $this->formDataProvider(); $params['type'] = 'saml'; + $params['general']['require_provisioned_account']['value'] = 0; + $params['general']['use_saml_auth_for_desktop']['value'] = 0; + $params['general']['allow_multiple_user_back_ends']['value'] = ''; $expected = new TemplateResponse('user_saml', 'admin', $params); $this->assertEquals($expected, $this->admin->getForm()); |