diff options
author | Thomas Citharel <tcit@tcit.fr> | 2017-07-07 11:17:54 +0200 |
---|---|---|
committer | Georg Ehrke <developer@georgehrke.com> | 2018-06-27 13:19:21 +0200 |
commit | 4a9f8623b50ab0ba6a7fd411c0750a6bd5f63c14 (patch) | |
tree | ab2a2fc068236db4a415391275ddf6dab75ea485 /apps/provisioning_api/tests | |
parent | 93011579fe27624ed746b54f1094da556d019f5a (diff) | |
download | nextcloud-server-4a9f8623b50ab0ba6a7fd411c0750a6bd5f63c14.tar.gz nextcloud-server-4a9f8623b50ab0ba6a7fd411c0750a6bd5f63c14.zip |
Fix review & tests
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Diffstat (limited to 'apps/provisioning_api/tests')
-rw-r--r-- | apps/provisioning_api/tests/Controller/UsersControllerTest.php | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/apps/provisioning_api/tests/Controller/UsersControllerTest.php b/apps/provisioning_api/tests/Controller/UsersControllerTest.php index 114742de4f9..0de62bc0d15 100644 --- a/apps/provisioning_api/tests/Controller/UsersControllerTest.php +++ b/apps/provisioning_api/tests/Controller/UsersControllerTest.php @@ -748,6 +748,10 @@ class UsersControllerTest extends TestCase { ->method('getDisplayName') ->will($this->returnValue('Demo User')); $targetUser + ->expects($this->exactly(5)) + ->method('getUID') + ->will($this->returnValue('UID')); + $targetUser ->expects($this->once()) ->method('getHome') ->will($this->returnValue('/var/www/newtcloud/data/UID')); @@ -759,10 +763,6 @@ class UsersControllerTest extends TestCase { ->expects($this->once()) ->method('getBackendClassName') ->will($this->returnValue('Database')); - $targetUser - ->expects($this->exactly(5)) - ->method('getUID') - ->will($this->returnValue('UID')); $expected = [ 'id' => 'UID', @@ -780,6 +780,7 @@ class UsersControllerTest extends TestCase { 'twitter' => 'twitter', 'groups' => ['group0', 'group1', 'group2'], 'language' => 'de', + 'locale' => null, ]; $this->assertEquals($expected, $this->invokePrivate($this->api, 'getUserData', ['UID'])); } @@ -865,7 +866,7 @@ class UsersControllerTest extends TestCase { ->method('getBackendClassName') ->will($this->returnValue('Database')); $targetUser - ->expects($this->exactly(5)) + ->expects($this->exactly(6)) ->method('getUID') ->will($this->returnValue('UID')); $this->accountManager->expects($this->any())->method('getUser') @@ -895,6 +896,7 @@ class UsersControllerTest extends TestCase { 'twitter' => 'twitter', 'groups' => [], 'language' => 'da', + 'locale' => null, ]; $this->assertEquals($expected, $this->invokePrivate($this->api, 'getUserData', ['UID'])); } @@ -1050,6 +1052,7 @@ class UsersControllerTest extends TestCase { 'twitter' => 'twitter', 'groups' => [], 'language' => 'ru', + 'locale' => null, ]; $this->assertEquals($expected, $this->invokePrivate($this->api, 'getUserData', ['UID'])); } |