LayoutBuilderContextMappingUpdatePathTest.php in Drupal 8
File
core/modules/layout_builder/tests/src/Functional/Update/LayoutBuilderContextMappingUpdatePathTest.php
View source
<?php
namespace Drupal\Tests\layout_builder\Functional\Update;
use Drupal\FunctionalTests\Update\UpdatePathTestBase;
class LayoutBuilderContextMappingUpdatePathTest extends UpdatePathTestBase {
protected function setDatabaseDumpFiles() {
$this->databaseDumpFiles = [
__DIR__ . '/../../../../../system/tests/fixtures/update/drupal-8.filled.standard.php.gz',
__DIR__ . '/../../../fixtures/update/layout-builder.php',
__DIR__ . '/../../../fixtures/update/layout-builder-field-schema.php',
__DIR__ . '/../../../fixtures/update/layout-builder-field-block.php',
];
}
public function testRunUpdates() {
$assert_session = $this
->assertSession();
$this
->runUpdates();
$this
->drupalLogin($this->rootUser);
$paths = [
'node/1',
'admin/structure/types/manage/article/display/default/layout',
];
foreach ($paths as $path) {
$this
->drupalGet($path);
$assert_session
->statusCodeEquals(200);
$assert_session
->elementExists('css', '.layout--onecol .layout__region--content .field--name-body');
}
}
}