getGroups() public method

public getGroups ( Imbo\Auth\AccessControl\GroupQuery $query = null, Groups $model )
$query Imbo\Auth\AccessControl\GroupQuery
$model Imbo\Model\Groups
示例#1
0
 /**
  * @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)));
 }