/**
* @group unit
*/
public function testSetScope()
{
$q = new MatchAll();
$type = 'test';
$scope = 'foo';
$query = new HasChild($q, $type);
$query->setScope($scope);
$expectedArray = array('has_child' => array('query' => $q->toArray(), 'type' => $type, '_scope' => $scope));
$this->assertEquals($expectedArray, $query->toArray());
}