public getGroups ( Imbo\Auth\AccessControl\GroupQuery $query = null, |
||
$query | Imbo\Auth\AccessControl\GroupQuery | |
$model |
/** * @dataProvider getGroupsData * @covers Imbo\Auth\AccessControl\Adapter\ArrayAdapter::getGroups */ public function testCanGetGroups(array $groups, array $result, $query = null) { $numGroups = count($groups); $model = $this->getMock('Imbo\\Model\\Groups'); $model->expects($this->once())->method('setHits')->with($numGroups); $adapter = new ArrayAdapter([], $groups); $this->assertSame(array_values($result), array_values($adapter->getGroups($query, $model))); }