3 namespace Drupal\Tests\image\FunctionalJavascript;
5 use Drupal\FunctionalJavascriptTests\WebDriverTestBase;
6 use Drupal\Tests\image\Kernel\ImageFieldCreationTrait;
7 use Drupal\Tests\TestFileCreationTrait;
10 * This class provides methods specifically for testing Image's field handling.
12 abstract class ImageFieldTestBase extends WebDriverTestBase {
14 use ImageFieldCreationTrait;
15 use TestFileCreationTrait {
16 getTestFiles as drupalGetTestFiles;
24 public static $modules = [
32 * An user with permissions to administer content types and image styles.
34 * @var \Drupal\user\UserInterface
41 protected function setUp() {
44 // Create Basic page and Article node types.
45 if ($this->profile !== 'standard') {
46 $this->drupalCreateContentType(['type' => 'page', 'name' => 'Basic page']);
47 $this->drupalCreateContentType(['type' => 'article', 'name' => 'Article']);
50 $this->adminUser = $this->drupalCreateUser([
52 'access administration pages',
53 'administer site configuration',
54 'administer content types',
55 'administer node fields',
57 'create article content',
58 'edit any article content',
59 'delete any article content',
60 'administer image styles',
61 'administer node display',
63 $this->drupalLogin($this->adminUser);