public function TomeStaticGeneratorFormTest::setUp in Tome 8
Overrides BrowserTestBase::setUp
File
- modules/
tome_static/ tests/ src/ Functional/ TomeStaticGeneratorFormTest.php, line 42
Class
- TomeStaticGeneratorFormTest
- Tests the functionality of the Tome Static form.
Namespace
Drupal\Tests\tome_static\FunctionalCode
public function setUp() {
parent::setUp();
$this
->createContentType([
'type' => 'article',
]);
$field_settings = [
'file_extensions' => 'png',
];
$formatter_settings = [
'image_style' => 'large',
'image_link' => '',
];
$this
->createImageField('field_image', 'article', [], $field_settings, [], $formatter_settings);
$directory = $this->siteDirectory . '/files/tome/static';
$settings['settings']['tome_static_directory'] = (object) [
'value' => $directory,
'required' => TRUE,
];
$this
->writeSettings($settings);
$this
->drupalLogin($this
->createUser([
'use tome static',
]));
}