diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2020-01-27 20:47:41 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2020-01-28 08:45:07 +0100 |
commit | d8e9cefcfeaf8a98d1af41a118915d0bab34e809 (patch) | |
tree | d2c512187ac614130ef411620504517ab9d6a8a5 /tests | |
parent | 35502b889299e2838e91f8303851d2ca38ad443d (diff) | |
download | nextcloud-server-d8e9cefcfeaf8a98d1af41a118915d0bab34e809.tar.gz nextcloud-server-d8e9cefcfeaf8a98d1af41a118915d0bab34e809.zip |
Move the Personal sections to the settings app
There is no need to have weird magic in the manager. This should be
properly registered in the right way. The settings code is messy
anyways. This is a start to make it a tad more clean.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/Settings/ManagerTest.php | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/tests/lib/Settings/ManagerTest.php b/tests/lib/Settings/ManagerTest.php index 761f5f9a5c1..2ba3b2e7b57 100644 --- a/tests/lib/Settings/ManagerTest.php +++ b/tests/lib/Settings/ManagerTest.php @@ -116,18 +116,7 @@ class ManagerTest extends TestCase { $this->manager->registerSection('personal', \OCA\WorkflowEngine\Settings\Section::class); - $this->url->expects($this->exactly(3)) - ->method('imagePath') - ->willReturnMap([ - ['core', 'actions/user.svg', '1'], - ['settings', 'password.svg', '2'], - ['core', 'clients/phone.svg', '3'], - ]); - $this->assertEquals([ - 0 => [new Section('personal-info', 'Personal info', 0, '1')], - 5 => [new Section('security', 'Security', 0, '2')], - 15 => [new Section('sync-clients', 'Mobile & desktop', 0, '3')], 55 => [\OC::$server->query(\OCA\WorkflowEngine\Settings\Section::class)], ], $this->manager->getPersonalSections()); } @@ -175,19 +164,7 @@ class ManagerTest extends TestCase { ->method('t') ->will($this->returnArgument(0)); - $this->url->expects($this->exactly(3)) - ->method('imagePath') - ->willReturnMap([ - ['core', 'actions/user.svg', '1'], - ['settings', 'password.svg', '2'], - ['core', 'clients/phone.svg', '3'], - ]); - - $this->assertArraySubset([ - 0 => [new Section('personal-info', 'Personal info', 0, '1')], - 5 => [new Section('security', 'Security', 0, '2')], - 15 => [new Section('sync-clients', 'Mobile & desktop', 0, '3')], - ], $this->manager->getPersonalSections()); + $this->assertEquals([], $this->manager->getPersonalSections()); } public function testGetAdminSettings() { @@ -276,7 +253,7 @@ class ManagerTest extends TestCase { $this->manager->registerSection('personal', \OCA\WorkflowEngine\Settings\Section::class); $this->manager->registerSection('admin', \OCA\WorkflowEngine\Settings\Section::class); - $this->url->expects($this->exactly(9)) + $this->url->expects($this->exactly(6)) ->method('imagePath') ->willReturnMap([ ['core', 'actions/user.svg', '1'], @@ -291,9 +268,6 @@ class ManagerTest extends TestCase { ]); $this->assertEquals([ - 0 => [new Section('personal-info', 'Personal info', 0, '1')], - 5 => [new Section('security', 'Security', 0, '2')], - 15 => [new Section('sync-clients', 'Mobile & desktop', 0, '3')], 55 => [\OC::$server->query(\OCA\WorkflowEngine\Settings\Section::class)], ], $this->manager->getPersonalSections()); |