protected function GeolocationGoogleJavascriptTestBase::drupalGetFilterGoogleKey in Geolocation Field 8
Filter the missing key Google Maps API error.
Parameters
mixed $path: Path to get.
Return value
string Return what drupal would.
Throws
\Zumba\GastonJS\Exception\JavascriptError
9 calls to GeolocationGoogleJavascriptTestBase::drupalGetFilterGoogleKey()
- GeolocationCommonMapAjaxJavascriptTest::testCommonMap in tests/
src/ FunctionalJavascript/ GeolocationCommonMapAjaxJavascriptTest.php - Tests the CommonMap style.
- GeolocationCommonMapAjaxJavascriptTest::testCommonMapAjax in tests/
src/ FunctionalJavascript/ GeolocationCommonMapAjaxJavascriptTest.php - Tests the CommonMap style.
- GeolocationGoogleGeocoderWidgetTest::testGeocoderWidgetEmptyValuePreserved in tests/
src/ FunctionalJavascript/ GeolocationGoogleGeocoderWidgetTest.php - Tests the Google Maps widget.
- GeolocationGoogleGeocoderWidgetTest::testGeocoderWidgetMapPresent in tests/
src/ FunctionalJavascript/ GeolocationGoogleGeocoderWidgetTest.php - Tests the Google Maps widget.
- GeolocationJavascriptTest::testCommonMap in tests/
src/ FunctionalJavascript/ GeolocationJavascriptTest.php - Tests the CommonMap style.
File
- tests/
src/ FunctionalJavascript/ GeolocationGoogleJavascriptTestBase.php, line 24
Class
- GeolocationGoogleJavascriptTestBase
- Support tests using Google Maps API.
Namespace
Drupal\Tests\geolocation\FunctionalJavascriptCode
protected function drupalGetFilterGoogleKey($path) {
try {
$this
->drupalGet($path);
$this
->getSession()
->getDriver()
->wait(1000, '1==2');
} catch (JavascriptError $e) {
foreach ($e
->javascriptErrors() as $errorItem) {
if (strpos((string) $errorItem, 'MissingKeyMapError') !== FALSE) {
continue;
}
else {
throw $e;
}
}
}
return FALSE;
}