class PathAliasTest in MongoDB 8
Tests MongoDB path alias functionality.
@group path
Hierarchy
- class \Drupal\mongodb\Tests\PathAliasTest extends \Drupal\path\Tests\PathAliasTest
Expanded class hierarchy of PathAliasTest
File
- src/
Tests/ PathAliasTest.php, line 16 - Definition of Drupal\mongodb\Tests\PathAliasTest.
Namespace
Drupal\mongodb\TestsView source
class PathAliasTest extends OriginalPathAliasTest {
/**
* Modules to enable.
*
* @var array
*/
public static $modules = array(
'mongodb',
'path',
);
public static function getInfo() {
return array(
'name' => 'Path alias functionality',
'description' => 'Add, edit, delete, and change alias and verify its consistency in the MongoDB.',
'group' => 'MongoDB',
);
}
/**
* {@inheritdoc}
*/
function getPID($alias) {
$result = \Drupal::service('mongo')
->get('url_alias')
->findOne(array(
'alias' => $alias,
), array(
'_id' => TRUE,
));
if (!empty($result)) {
return $result['_id'];
}
return FALSE;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PathAliasTest:: |
public static | property | Modules to enable. | |
PathAliasTest:: |
public static | function | ||
PathAliasTest:: |
function |