diff options
author | Joas Schilling <coding@schilljs.com> | 2020-09-15 11:17:33 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-09-15 11:17:33 +0200 |
commit | 963a03e108632931c202e9a13bb59914a5bbb274 (patch) | |
tree | ccae78b03d28e59c546036da585713f782a0fcf3 | |
parent | 7362145decc0aec9077bef39bad2d769ae72fd60 (diff) | |
download | nextcloud-server-963a03e108632931c202e9a13bb59914a5bbb274.tar.gz nextcloud-server-963a03e108632931c202e9a13bb59914a5bbb274.zip |
Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r-- | tests/lib/Settings/ManagerTest.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/lib/Settings/ManagerTest.php b/tests/lib/Settings/ManagerTest.php index 761f5f9a5c1..3d8ae130dbf 100644 --- a/tests/lib/Settings/ManagerTest.php +++ b/tests/lib/Settings/ManagerTest.php @@ -116,6 +116,10 @@ class ManagerTest extends TestCase { $this->manager->registerSection('personal', \OCA\WorkflowEngine\Settings\Section::class); + $this->container->method('query') + ->with(\OCA\Settings\Personal\Additional::class) + ->willReturn($this->createMock(\OCA\Settings\Personal\Additional::class)); + $this->url->expects($this->exactly(3)) ->method('imagePath') ->willReturnMap([ @@ -183,6 +187,10 @@ class ManagerTest extends TestCase { ['core', 'clients/phone.svg', '3'], ]); + $this->container->method('query') + ->with(\OCA\Settings\Personal\Additional::class) + ->willReturn($this->createMock(\OCA\Settings\Personal\Additional::class)); + $this->assertArraySubset([ 0 => [new Section('personal-info', 'Personal info', 0, '1')], 5 => [new Section('security', 'Security', 0, '2')], @@ -290,6 +298,10 @@ class ManagerTest extends TestCase { ['settings', 'help.svg', '4'], ]); + $this->container->method('query') + ->with(\OCA\Settings\Personal\Additional::class) + ->willReturn($this->createMock(\OCA\Settings\Personal\Additional::class)); + $this->assertEquals([ 0 => [new Section('personal-info', 'Personal info', 0, '1')], 5 => [new Section('security', 'Security', 0, '2')], |