BackgroundImageTestBase.php in Background Image 2.x
File
tests/src/Functional/BackgroundImageTestBase.php
View source
<?php
namespace Drupal\Tests\background_image\Functional;
use Drupal\Tests\BrowserTestBase;
use Drupal\Tests\TestFileCreationTrait;
abstract class BackgroundImageTestBase extends BrowserTestBase {
use TestFileCreationTrait {
getTestFiles as drupalGetTestFiles;
compareFiles as drupalCompareFiles;
}
public function addImageForm($type, $label) {
$this
->drupalGet('admin/config/media/background_image/add');
$edit = [
'type' => $type,
'label' => $label,
];
$this
->drupalPostForm(NULL, $edit, t('Continue'));
}
}