diff --git a/src/Command/TestClosestOpenHubsCommand.php b/src/Command/TestClosestOpenHubsCommand.php new file mode 100644 index 00000000..f82a1400 --- /dev/null +++ b/src/Command/TestClosestOpenHubsCommand.php @@ -0,0 +1,45 @@ +setName('test:closestopenhubs') + ->setDescription('Test the get closest open hubs service.') + ->setHelp('Test the get closese open hubs service.') + ->addArgument('long', InputArgument::REQUIRED, 'Longitude') + ->addArgument('lat', InputArgument::REQUIRED, 'Latitude'); + } + + public function __construct(MapTools $maptools) + { + $this->maptools = $maptools; + + parent::__construct(); + } + + protected function execute(InputInterface $input, OutputInterface $output) + { + $long = $input->getArgument('long'); + $lat = $input->getArgument('lat'); + + $point = new Point($long, $lat); + $this->maptools->getClosestOpenHubs(); + + return 0; + } + +}