class NewViewConfigSchemaTest
Same name and namespace in other branches
- 11.x core/modules/views_ui/tests/src/Functional/NewViewConfigSchemaTest.php \Drupal\Tests\views_ui\Functional\NewViewConfigSchemaTest
Tests configuration schema against new views.
@group views_ui
Hierarchy
- class \Drupal\Tests\BrowserTestBase uses \Drupal\Core\Test\FunctionalTestSetupTrait, \Drupal\Tests\UiHelperTrait, \Drupal\Core\Test\TestSetupTrait, \Drupal\Tests\block\Traits\BlockCreationTrait, \Drupal\FunctionalTests\AssertLegacyTrait, \Drupal\Tests\RandomGeneratorTrait, \Drupal\Tests\node\Traits\NodeCreationTrait, \Drupal\Tests\node\Traits\ContentTypeCreationTrait, \Drupal\Tests\ConfigTestTrait, \Drupal\Tests\TestRequirementsTrait, \Drupal\Tests\user\Traits\UserCreationTrait, \Drupal\Tests\XdebugRequestTrait, \Drupal\Tests\Traits\PhpUnitWarnings, \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait, \Drupal\Tests\ExtensionListTestTrait implements \PHPUnit\Framework\TestCase
- class \Drupal\Tests\views\Functional\ViewTestBase uses \Drupal\views\Tests\ViewResultAssertionTrait implements \Drupal\Tests\BrowserTestBase
- class \Drupal\Tests\views_ui\Functional\UITestBase implements \Drupal\Tests\views\Functional\ViewTestBase
- class \Drupal\Tests\views_ui\Functional\NewViewConfigSchemaTest implements \Drupal\Tests\views_ui\Functional\UITestBase
- class \Drupal\Tests\views_ui\Functional\UITestBase implements \Drupal\Tests\views\Functional\ViewTestBase
- class \Drupal\Tests\views\Functional\ViewTestBase uses \Drupal\views\Tests\ViewResultAssertionTrait implements \Drupal\Tests\BrowserTestBase
Expanded class hierarchy of NewViewConfigSchemaTest
File
-
core/
modules/ views_ui/ tests/ src/ Functional/ NewViewConfigSchemaTest.php, line 10
Namespace
Drupal\Tests\views_ui\FunctionalView source
class NewViewConfigSchemaTest extends UITestBase {
/**
* Modules to enable.
*
* @var array
*/
protected static $modules = [
'views_ui',
'node',
'comment',
'file',
'taxonomy',
'dblog',
];
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* Tests creating brand new views.
*/
public function testNewViews() {
$this->drupalLogin($this->drupalCreateUser([
'administer views',
]));
// Create views with all core Views wizards.
$wizards = [
// Wizard with their own classes.
'node',
'node_revision',
'users',
'comment',
'file_managed',
'taxonomy_term',
'watchdog',
];
foreach ($wizards as $wizard_key) {
$edit = [];
$edit['label'] = $this->randomString();
$edit['id'] = strtolower($this->randomMachineName());
$edit['show[wizard_key]'] = $wizard_key;
$edit['description'] = $this->randomString();
$this->drupalGet('admin/structure/views/add');
$this->submitForm($edit, 'Save and edit');
}
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.