Created
July 13, 2017 09:22
-
-
Save dbjpanda/5ebe0805e84b7ba076cd551a294f8650 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Drupal\Tests\search_api_location\Kernel; | |
use Drupal\KernelTests\KernelTestBase; | |
use Drupal\search_api_location\Plugin\search_api_location\location_input\Geocode; | |
/** | |
* Test for the geocode plugin. | |
* | |
* @group search_api_location | |
*/ | |
class GeocodeTest extends KernelTestBase { | |
/** | |
* Modules to enable for this test. | |
* | |
* @var string[] | |
*/ | |
public static $modules = [ | |
'user', | |
'search_api', | |
'search_api_location', | |
'geocoder' | |
]; | |
/** | |
* Test the parsed input entered by user in text format. | |
*/ | |
public function testGetParsedInput() { | |
$sut = $this->container | |
->get('plugin.manager.search_api_location.location_input') | |
->createInstance('geocode'); | |
$input['value']="Delhi"; | |
$this->assertEquals($sut->getParsedInput($input), '28.704059,77.10249'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment