summaryrefslogtreecommitdiffstats
path: root/tests/lib
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib')
-rw-r--r--tests/lib/Settings/ManagerTest.php19
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