abstract class ImageFieldTestBase in Drupal 10
Same name in this branch
- 10 core/modules/image/tests/src/Functional/ImageFieldTestBase.php \Drupal\Tests\image\Functional\ImageFieldTestBase
- 10 core/modules/image/tests/src/FunctionalJavascript/ImageFieldTestBase.php \Drupal\Tests\image\FunctionalJavascript\ImageFieldTestBase
Same name and namespace in other branches
- 8 core/modules/image/tests/src/FunctionalJavascript/ImageFieldTestBase.php \Drupal\Tests\image\FunctionalJavascript\ImageFieldTestBase
- 9 core/modules/image/tests/src/FunctionalJavascript/ImageFieldTestBase.php \Drupal\Tests\image\FunctionalJavascript\ImageFieldTestBase
This class provides methods specifically for testing Image's field handling.
Hierarchy
- class \Drupal\Tests\BrowserTestBase extends \PHPUnit\Framework\TestCase uses \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait, FunctionalTestSetupTrait, TestSetupTrait, BlockCreationTrait, ConfigTestTrait, ExtensionListTestTrait, ContentTypeCreationTrait, NodeCreationTrait, RandomGeneratorTrait, TestRequirementsTrait, PhpUnitWarnings, UiHelperTrait, UserCreationTrait, XdebugRequestTrait
- class \Drupal\FunctionalJavascriptTests\WebDriverTestBase
- class \Drupal\Tests\image\FunctionalJavascript\ImageFieldTestBase uses ImageFieldCreationTrait, TestFileCreationTrait
- class \Drupal\FunctionalJavascriptTests\WebDriverTestBase
Expanded class hierarchy of ImageFieldTestBase
File
- core/
modules/ image/ tests/ src/ FunctionalJavascript/ ImageFieldTestBase.php, line 12
Namespace
Drupal\Tests\image\FunctionalJavascriptView source
abstract class ImageFieldTestBase extends WebDriverTestBase {
use ImageFieldCreationTrait;
use TestFileCreationTrait {
getTestFiles as drupalGetTestFiles;
}
/**
* Modules to enable.
*
* @var array
*/
protected static $modules = [
'node',
'image',
'field_ui',
'image_module_test',
];
/**
* A user with permissions to administer content types and image styles.
*
* @var \Drupal\user\UserInterface
*/
protected $adminUser;
/**
* {@inheritdoc}
*/
protected function setUp() : void {
parent::setUp();
// Create Basic page and Article node types.
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);
}
}