public function BackgroundImageTestBase::addImageForm in Background Image 8
Same name and namespace in other branches
- 2.x tests/src/Functional/BackgroundImageTestBase.php \Drupal\Tests\background_image\Functional\BackgroundImageTestBase::addImageForm()
- 2.0.x tests/src/Functional/BackgroundImageTestBase.php \Drupal\Tests\background_image\Functional\BackgroundImageTestBase::addImageForm()
Adds a image.
Parameters
int $type: The type (-1, 0, 1, 4).
string $label: The form label.
1 call to BackgroundImageTestBase::addImageForm()
- AdminTest::testListAddEdit in tests/
src/ Functional/ AdminTest.php - Tests view builder functionality.
File
- tests/
src/ Functional/ BackgroundImageTestBase.php, line 26
Class
- BackgroundImageTestBase
- Defines a base-class for background-image tests.
Namespace
Drupal\Tests\background_image\FunctionalCode
public function addImageForm($type, $label) {
$this
->drupalGet('admin/config/media/background_image/add');
$edit = [
'type' => $type,
'label' => $label,
];
$this
->drupalPostForm(NULL, $edit, t('Continue'));
}