
| Current Path : /var/www/html/stolberg/web/core/modules/path_alias/tests/src/Kernel/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/stolberg/web/core/modules/path_alias/tests/src/Kernel/PathAliasStorageSchemaTest.php |
<?php
declare(strict_types=1);
namespace Drupal\Tests\path_alias\Kernel;
use Drupal\KernelTests\KernelTestBase;
/**
* Tests the path_alias storage schema.
*
* @coversDefaultClass \Drupal\path_alias\PathAliasStorageSchema
*
* @group path_alias
*/
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'));
}
}