protected function ALProfilesWebTest::getNidFromCurrentUrl in Acquia Lift Connector 7.2
Same name and namespace in other branches
- 7 acquia_lift_profiles/tests/acquia_lift_profiles.test \ALProfilesWebTest::getNidFromCurrentUrl()
Helper to grab the nid from the url so that we don't have to make assumptions about the nid of the node we just created.
1 call to ALProfilesWebTest::getNidFromCurrentUrl()
- ALProfilesWebTest::testThumbnailImage in acquia_lift_profiles/
tests/ acquia_lift_profiles.test
File
- acquia_lift_profiles/
tests/ acquia_lift_profiles.test, line 534 - Tests for Acquia Lift Profiles module.
Class
- ALProfilesWebTest
- Tests Acquia Lift Profiles functionality.
Code
protected function getNidFromCurrentUrl() {
$url = $this
->getUrl();
$matches = array();
if (preg_match('/node\\/(\\d+)/', $url, $matches)) {
return $matches[1];
}
return NULL;
}