ImageFieldTestBase.php in Drupal 10
File
core/modules/image/tests/src/FunctionalJavascript/ImageFieldTestBase.php
View source
<?php
namespace Drupal\Tests\image\FunctionalJavascript;
use Drupal\FunctionalJavascriptTests\WebDriverTestBase;
use Drupal\Tests\image\Kernel\ImageFieldCreationTrait;
use Drupal\Tests\TestFileCreationTrait;
abstract class ImageFieldTestBase extends WebDriverTestBase {
use ImageFieldCreationTrait;
use TestFileCreationTrait {
getTestFiles as drupalGetTestFiles;
}
protected static $modules = [
'node',
'image',
'field_ui',
'image_module_test',
];
protected $adminUser;
protected function setUp() : void {
parent::setUp();
if ($this->profile !== 'standard') {
$this
->drupalCreateContentType([
'type' => 'page',
'name' => 'Basic page',
]);
$this
->drupalCreateContentType([
'type' => 'article',
'name' => 'Article',
]);
}
$this->adminUser = $this
->drupalCreateUser([
'access content',
'access administration pages',
'administer site configuration',
'administer content types',
'administer node fields',
'administer nodes',
'create article content',
'edit any article content',
'delete any article content',
'administer image styles',
'administer node display',
]);
$this
->drupalLogin($this->adminUser);
}
}
Classes
Name |
Description |
ImageFieldTestBase |
This class provides methods specifically for testing Image's field handling. |