class PathAliasStorageSchemaTest
Same name and namespace in other branches
- 11.x core/modules/path_alias/tests/src/Kernel/PathAliasStorageSchemaTest.php \Drupal\Tests\path_alias\Kernel\PathAliasStorageSchemaTest
Tests the path_alias storage schema.
@coversDefaultClass \Drupal\path_alias\PathAliasStorageSchema
@group path_alias
Hierarchy
- class \Drupal\Tests\path_alias\Kernel\PathAliasStorageSchemaTest
Expanded class hierarchy of PathAliasStorageSchemaTest
File
-
core/
modules/ path_alias/ tests/ src/ Kernel/ PathAliasStorageSchemaTest.php, line 16
Namespace
Drupal\Tests\path_alias\KernelView source
class PathAliasStorageSchemaTest extends KernelTestBase {
/**
* {@inheritdoc}
*/
protected static $modules = [
'path_alias',
];
/**
* {@inheritdoc}
*/
protected function setUp() : void {
parent::setUp();
$this->installEntitySchema('path_alias');
}
/**
* Tests that the path_alias__status index is removed.
*
* @covers ::getEntitySchema
*/
public function testPathAliasStatusIndexRemoved() : void {
$schema = \Drupal::database()->schema();
$table_name = 'path_alias';
$this->assertTrue($schema->indexExists($table_name, 'path_alias__alias_langcode_id_status'));
$this->assertTrue($schema->indexExists($table_name, 'path_alias__path_langcode_id_status'));
$this->assertFalse($schema->indexExists($table_name, 'path_alias__status'));
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
ExtensionListTestTrait::getModulePath | protected | function | Gets the path for the specified module. |
ExtensionListTestTrait::getThemePath | protected | function | Gets the path for the specified theme. |
PathAliasStorageSchemaTest::$modules | protected static | property | Modules to install. |
PathAliasStorageSchemaTest::setUp | protected | function | |
PathAliasStorageSchemaTest::testPathAliasStatusIndexRemoved | public | function | Tests that the path_alias__status index is removed. |
StorageCopyTrait::replaceStorageContents | protected static | function | Copy the configuration from one storage to another and remove stale items. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.