public function FileFieldSourcesTestBase::createTemporaryFileEntity in FileField Sources 8
Create temporary file entity.
Return value
object Temporary file entity.
4 calls to FileFieldSourcesTestBase::createTemporaryFileEntity()
- ClipboardSourceTest::testClipboardSourceEnabled in tests/
src/ Functional/ ClipboardSourceTest.php - Tests clipboard source enabled.
- FileFieldSourcesTestBase::createPermanentFileEntity in tests/
src/ Functional/ FileFieldSourcesTestBase.php - Create permanent file entity.
- MultipleValuesTest::setUp in tests/
src/ Functional/ MultipleValuesTest.php - Sets up for multiple values test case.
- UploadSourceTest::assertUploadSourceWorkProperly in tests/
src/ Functional/ UploadSourceTest.php - Tests upload source still working properly.
File
- tests/
src/ Functional/ FileFieldSourcesTestBase.php, line 161
Class
- FileFieldSourcesTestBase
- Base class for File Field Sources test cases.
Namespace
Drupal\Tests\filefield_sources\FunctionalCode
public function createTemporaryFileEntity() {
$file = $this
->createTemporaryFile();
// Add a filesize property to files as would be read by file_load().
$file->filesize = filesize($file->uri);
// Begin building file object.
return File::create((array) $file);
}