diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2016-08-23 11:20:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-23 11:20:43 +0200 |
commit | 3ed102497e2a3b732a0c7e91398b5bb6d147d12a (patch) | |
tree | 47bb153b50b5dfae6366ab80d2f43a2ad666d091 /tests | |
parent | d85e678f09e2538796a60f9dacee6554b74a8de4 (diff) | |
parent | 94432c089f0a598ed2e96d086731b44dc2897918 (diff) | |
download | nextcloud-server-3ed102497e2a3b732a0c7e91398b5bb6d147d12a.tar.gz nextcloud-server-3ed102497e2a3b732a0c7e91398b5bb6d147d12a.zip |
Merge pull request #995 from nextcloud/workflow-section
Workflow section + hidden empty sections
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/Settings/ManagerTest.php | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/tests/lib/Settings/ManagerTest.php b/tests/lib/Settings/ManagerTest.php index cd5100eff6d..942a2bb63e7 100644 --- a/tests/lib/Settings/ManagerTest.php +++ b/tests/lib/Settings/ManagerTest.php @@ -136,15 +136,28 @@ class ManagerTest extends TestCase { public function testGetAdminSections() { $qb = $this->getMockBuilder('\OCP\DB\QueryBuilder\IQueryBuilder')->getMock(); + $expr = $this->getMockBuilder('OCP\DB\QueryBuilder\IExpressionBuilder')->getMock(); $qb ->expects($this->once()) - ->method('select') - ->with(['class', 'priority']) + ->method('selectDistinct') + ->with('s.class') ->willReturn($qb); $qb ->expects($this->once()) + ->method('addSelect') + ->with('s.priority') + ->willReturn($qb); + $qb + ->expects($this->exactly(2)) ->method('from') - ->with('admin_sections') + ->willReturn($qb); + $qb + ->expects($this->once()) + ->method('expr') + ->willReturn($expr); + $qb + ->expects($this->once()) + ->method('where') ->willReturn($qb); $stmt = $this->getMockBuilder('\Doctrine\DBAL\Driver\Statement')->getMock(); $qb |