NodeViewsAnalyzeTest.php in Drupal 9
File
core/modules/node/tests/src/Functional/Views/NodeViewsAnalyzeTest.php
View source
<?php
namespace Drupal\Tests\node\Functional\Views;
class NodeViewsAnalyzeTest extends NodeTestBase {
protected static $modules = [
'views_ui',
'node_test_views',
];
protected $defaultTheme = 'stark';
public static $testViews = [
'test_node_views_analyze',
];
public function testNodeViewsAnalyze() {
$admin_user = $this
->createUser([
'administer views',
]);
$this
->drupalLogin($admin_user);
$this
->drupalGet('admin/structure/views/nojs/analyze/test_node_views_analyze/page_1');
$this
->assertSession()
->statusCodeEquals(200);
$this
->assertSession()
->responseContains('has set node/% as path. This will not produce what you want. If you want to have multiple versions of the node view, use Layout Builder.');
}
}