EntityTestRevisionTest.php in Drupal 9
File
core/modules/views/tests/src/Functional/Wizard/EntityTestRevisionTest.php
View source
<?php
namespace Drupal\Tests\views\Functional\Wizard;
class EntityTestRevisionTest extends WizardTestBase {
protected static $modules = [
'entity_test',
];
protected $defaultTheme = 'stark';
public function testRevisionsViewWithNoTypeOnBaseTable() {
$type = [
'show[wizard_key]' => 'standard:entity_test_rev_revision',
];
$this
->drupalGet('admin/structure/views/add');
$this
->submitForm($type, 'Update "Show" choice');
$view = [];
$view['label'] = $this
->randomMachineName(16);
$view['id'] = strtolower($this
->randomMachineName(16));
$view['description'] = $this
->randomMachineName(16);
$view['page[create]'] = FALSE;
$view['show[type]'] = 'entity_test_rev';
$this
->submitForm($view, 'Save and edit');
$view_storage_controller = \Drupal::entityTypeManager()
->getStorage('view');
$view = $view_storage_controller
->load($view['id']);
$display_options = $view
->getDisplay('default')['display_options'];
$this
->assertEmpty($display_options['filters']);
}
}