public function BlockTest::setUp in MongoDB 7
Setup the test environment.
File
- mongodb_block_ui/
src/ Tests/ BlockTest.php, line 31
Class
- BlockTest
- Class BlockTest.
Namespace
Drupal\mongodb_block_ui\TestsCode
public function setUp() {
parent::setUp();
// Create and log in an administrative user having access to the Full HTML
// text format.
$full_html_format = db_query_range('SELECT * FROM {filter_format} WHERE name = :name', 0, 1, array(
':name' => 'Full HTML',
))
->fetchObject();
$adminuser = $this
->drupalCreateUser(array(
'administer blocks',
filter_permission_name($full_html_format),
'access administration pages',
'access dashboard',
));
$this
->drupalLogin($adminuser);
// Define the existing regions.
$this->regions = array();
$this->regions[] = array(
'name' => 'header',
'class' => 'region region-header clearfix',
);
$this->regions[] = array(
'name' => 'sidebar_first',
);
$this->regions[] = array(
'name' => 'content',
);
$this->regions[] = array(
'name' => 'sidebar_second',
);
$this->regions[] = array(
'name' => 'footer',
);
}