Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
Signed-off-by: Joas Schilling <coding@schilljs.com>
  • Loading branch information
nickvergessen committed Sep 15, 2020
1 parent 7362145 commit 963a03e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/lib/Settings/ManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ public function testGetPersonalSections() {

$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([
Expand Down Expand Up @@ -183,6 +187,10 @@ public function testGetPersonalSectionsEmptySection() {
['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')],
Expand Down Expand Up @@ -290,6 +298,10 @@ public function testSameSectionAsPersonalAndAdmin() {
['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')],
Expand Down

0 comments on commit 963a03e

Please sign in to comment.