protected function OpignoQuizImportAppWebTestCase::_getNid in Opigno Quiz Import App 7
Extract the node nid from the URL.
1 call to OpignoQuizImportAppWebTestCase::_getNid()
- OpignoQuizImportAppWebTestCase::testGlobalImport in tests/
OpignoQuizImportAppWebTestCase.test - Test importing a quiz in global context.
File
- tests/
OpignoQuizImportAppWebTestCase.test, line 199 - Defines the unit tests for the Opigno Quiz Import app.
Class
- OpignoQuizImportAppWebTestCase
- @file Defines the unit tests for the Opigno Quiz Import app.
Code
protected function _getNid($path) {
if (preg_match('/node\\/[0-9]+/', $path)) {
$parts = explode('node/', $path);
return array_shift(explode('/', $parts[1]));
}
}