public function testNear()
{
$near = 'a';
$query = ['b'];
$options = ['c'];
$modifiedNear = 'd';
$modifiedQuery = ['e'];
$modifiedOptions = ['f'];
// This listener will modify the data and options.
$preNearListener = new PreNearListener($modifiedNear, $modifiedQuery, $modifiedOptions);
$eventManager = new EventManager();
$eventManager->addEventListener([Events::preNear], $preNearListener);
// Ensure that the modified pipeline and options are sent to the doAggregate call.
$collection = $this->getMockCollection($eventManager, ['doNear' => [$modifiedNear, $modifiedQuery, $modifiedOptions]]);
$collection->near($near, $query, $options);
}