PathAliasStorageSchemaTest.php
Namespace
Drupal\Tests\path_alias\KernelFile
-
core/
modules/ path_alias/ tests/ src/ Kernel/ PathAliasStorageSchemaTest.php
View source
<?php
declare (strict_types=1);
namespace Drupal\Tests\path_alias\Kernel;
use Drupal\KernelTests\KernelTestBase;
use Drupal\path_alias\PathAliasStorageSchema;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
/**
* Tests the path_alias storage schema.
*/
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.
*
* @legacy-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'));
}
}
Classes
| Title | Deprecated | Summary |
|---|---|---|
| PathAliasStorageSchemaTest | Tests the path_alias storage schema. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.