public function FileFieldSourcesTestBase::removeFile in FileField Sources 8
Remove uploaded file.
Parameters
string $filename: File name.
int $delta: Delta in multiple values field.
9 calls to FileFieldSourcesTestBase::removeFile()
- AttachSourceTest::fileCanBeUploadAndDeleted in tests/
src/ Functional/ AttachSourceTest.php - AttachSourceTest::testCopyFileFromAbsolutePath in tests/
src/ Functional/ AttachSourceTest.php - Tests copy file from absolute path.
- ClipboardSourceTest::testClipboardSourceEnabled in tests/
src/ Functional/ ClipboardSourceTest.php - Tests clipboard source enabled.
- ImceSourceTest::testImceSourceEnabled in tests/
src/ Functional/ ImceSourceTest.php - Tests imce source enabled.
- MultipleValuesTest::testUploadThenRemoveFiles in tests/
src/ Functional/ MultipleValuesTest.php - Tests uploading then removing files.
File
- tests/
src/ Functional/ FileFieldSourcesTestBase.php, line 427
Class
- FileFieldSourcesTestBase
- Base class for File Field Sources test cases.
Namespace
Drupal\Tests\filefield_sources\FunctionalCode
public function removeFile($filename, $delta = 0) {
$this
->drupalPostForm(NULL, [], $this->fieldName . '_' . $delta . '_remove_button');
// Ensure file is removed.
$this
->assertFileRemoved($filename);
}