protected function EditorUploadImageScaleTest::setUp in Drupal 8
Same name and namespace in other branches
- 9 core/modules/editor/tests/src/Functional/EditorUploadImageScaleTest.php \Drupal\Tests\editor\Functional\EditorUploadImageScaleTest::setUp()
Overrides BrowserTestBase::setUp
File
- core/
modules/ editor/ tests/ src/ Functional/ EditorUploadImageScaleTest.php, line 42
Class
- EditorUploadImageScaleTest
- Tests scaling of inline images.
Namespace
Drupal\Tests\editor\FunctionalCode
protected function setUp() {
parent::setUp();
// Add text format.
FilterFormat::create([
'format' => 'basic_html',
'name' => 'Basic HTML',
'weight' => 0,
])
->save();
// Set up text editor.
Editor::create([
'format' => 'basic_html',
'editor' => 'unicorn',
'image_upload' => [
'status' => TRUE,
'scheme' => 'public',
'directory' => 'inline-images',
'max_size' => '',
'max_dimensions' => [
'width' => NULL,
'height' => NULL,
],
],
])
->save();
// Create admin user.
$this->adminUser = $this
->drupalCreateUser([
'administer filters',
'use text format basic_html',
]);
$this
->drupalLogin($this->adminUser);
}