array( 'query' => $q->toArray(), 'type' => $type ) ); $this->assertEquals($expectedArray, $query->toArray()); } public function testSetScope() { $q = new MatchAll(); $type = 'test'; $scope = 'foo'; $query = new HasParent($q, $type); $query->setScope($scope); $expectedArray = array( 'has_parent' => array( 'query' => $q->toArray(), 'type' => $type, '_scope' => $scope ) ); $this->assertEquals($expectedArray, $query->toArray()); } }