SmartTitleBrowserTestBase.php in Smart Title 8
File
tests/src/Functional/SmartTitleBrowserTestBase.php
View source
<?php
namespace Drupal\Tests\smart_title\Functional;
use Drupal\Tests\BrowserTestBase;
abstract class SmartTitleBrowserTestBase extends BrowserTestBase {
protected $defaultTheme = 'stark';
protected $profile = 'testing';
protected static $modules = [
'block',
'field_ui',
'node',
'smart_title',
'views',
];
protected $adminUser;
protected $testPageNode;
protected function setUp() {
parent::setUp();
$this
->drupalPlaceBlock('local_tasks_block');
$this
->drupalPlaceBlock('system_main_block');
$this
->config('system.site')
->set('page.front', '/node')
->save();
$this
->drupalCreateContentType([
'type' => 'test_page',
'name' => 'Test page',
'display_submitted' => FALSE,
]);
$this
->config('smart_title.settings')
->set('smart_title', [
'node:test_page',
])
->save();
$this
->rebuildAll();
$this->testPageNode = $this
->drupalCreateNode([
'type' => 'test_page',
]);
$this->adminUser = $this
->drupalCreateUser([
'access content overview',
'access content',
'administer site configuration',
'administer content types',
'administer display modes',
'administer node display',
'administer node fields',
'administer node form display',
'administer nodes',
'create test_page content',
]);
}
}