diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2015-10-20 12:02:08 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2015-10-26 16:15:15 +0100 |
commit | e19c49295a4bba82b2e1fa613ad03608c79d6443 (patch) | |
tree | db431dbf13f6044a687a03086ec566cb6217e4c2 /tests/settings | |
parent | 618a08aa00160c6b709a0da2bf8566b9002073ff (diff) | |
download | nextcloud-server-e19c49295a4bba82b2e1fa613ad03608c79d6443.tar.gz nextcloud-server-e19c49295a4bba82b2e1fa613ad03608c79d6443.zip |
Use speaking ids
Diffstat (limited to 'tests/settings')
-rw-r--r-- | tests/settings/controller/AppSettingsControllerTest.php | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/tests/settings/controller/AppSettingsControllerTest.php b/tests/settings/controller/AppSettingsControllerTest.php index 62eebc2de50..09595d05661 100644 --- a/tests/settings/controller/AppSettingsControllerTest.php +++ b/tests/settings/controller/AppSettingsControllerTest.php @@ -132,10 +132,12 @@ class AppSettingsControllerTest extends TestCase { $expected = [ [ 'id' => 0, + 'ident' => 'enabled', 'displayName' => 'Enabled', ], [ 'id' => 1, + 'ident' => 'disabled', 'displayName' => 'Not enabled', ], ]; @@ -157,27 +159,33 @@ class AppSettingsControllerTest extends TestCase { $expected = [ [ 'id' => 0, + 'ident' => 'enabled', 'displayName' => 'Enabled', ], [ 'id' => 1, + 'ident' => 'disabled', 'displayName' => 'Not enabled', ], [ 'id' => 0, + 'ident' => 'tools', 'displayName' => 'Tools', ], [ 'id' => 1, - 'displayName' => 'Awesome Games', + 'ident' => 'games', + 'displayName' => 'Games', ], [ 'id' => 2, - 'displayName' => 'PIM', + 'ident' => 'productivity', + 'displayName' => 'Productivity', ], [ 'id' => 3, - 'displayName' => 'Papershop', + 'ident' => 'multimedia', + 'displayName' => 'Multimedia', ], ]; @@ -201,9 +209,9 @@ class AppSettingsControllerTest extends TestCase { ->will($this->returnValue( [ 'ownCloud Tools', - 'Awesome Games', - 'ownCloud PIM', - 'Papershop', + 'Games', + 'ownCloud Productivity', + 'Multimedia', ] )); @@ -223,7 +231,7 @@ class AppSettingsControllerTest extends TestCase { $policy = new ContentSecurityPolicy(); $policy->addAllowedImageDomain('https://apps.owncloud.com'); - $expected = new TemplateResponse('settings', 'apps', ['experimentalEnabled' => false, 'category' => 0], 'user'); + $expected = new TemplateResponse('settings', 'apps', ['experimentalEnabled' => false, 'category' => 'enabled'], 'user'); $expected->setContentSecurityPolicy($policy); $this->assertEquals($expected, $this->appSettingsController->viewApps()); @@ -242,9 +250,9 @@ class AppSettingsControllerTest extends TestCase { $policy = new ContentSecurityPolicy(); $policy->addAllowedImageDomain('https://apps.owncloud.com'); - $expected = new TemplateResponse('settings', 'apps', ['experimentalEnabled' => false, 'category' => 1], 'user'); + $expected = new TemplateResponse('settings', 'apps', ['experimentalEnabled' => false, 'category' => 'disabled'], 'user'); $expected->setContentSecurityPolicy($policy); - $this->assertEquals($expected, $this->appSettingsController->viewApps(1)); + $this->assertEquals($expected, $this->appSettingsController->viewApps('disabled')); } } |