class RemoteFileSaveUploadTest
Tests the file uploading functions.
@group file @group #slow
Hierarchy
- class \Drupal\Tests\file\Functional\FileManagedTestBase
- class \Drupal\Tests\file\Functional\SaveUploadTest extends \Drupal\Tests\file\Functional\FileManagedTestBase
- class \Drupal\Tests\file\Functional\RemoteFileSaveUploadTest extends \Drupal\Tests\file\Functional\SaveUploadTest
- class \Drupal\Tests\file\Functional\SaveUploadTest extends \Drupal\Tests\file\Functional\FileManagedTestBase
Expanded class hierarchy of RemoteFileSaveUploadTest
File
-
core/
modules/ file/ tests/ src/ Functional/ RemoteFileSaveUploadTest.php, line 13
Namespace
Drupal\Tests\file\FunctionalView source
class RemoteFileSaveUploadTest extends SaveUploadTest {
/**
* {@inheritdoc}
*/
protected static $modules = [
'file_test',
];
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* {@inheritdoc}
*/
protected function setUp() : void {
parent::setUp();
$this->config('system.file')
->set('default_scheme', 'dummy-remote')
->save();
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
FileManagedTestBase::assertDifferentFile | public | function | Asserts that two files are not the same by comparing the fid and filepath. | |
FileManagedTestBase::assertFileHookCalled | public | function | Assert that a hook_file_* hook was called a certain number of times. | |
FileManagedTestBase::assertFileHooksCalled | public | function | Asserts that the specified file hooks were called only once. | |
FileManagedTestBase::assertFileUnchanged | public | function | Asserts that two files have the same values (except timestamp). | |
FileManagedTestBase::assertSameFile | public | function | Asserts that two files are the same by comparing the fid and filepath. | |
FileManagedTestBase::createFile | public | function | Creates and saves a file, asserting that it was saved. | |
FileManagedTestBase::createUri | public | function | Creates a file and returns its URI. | |
RemoteFileSaveUploadTest::$defaultTheme | protected | property | Overrides SaveUploadTest::$defaultTheme | |
RemoteFileSaveUploadTest::$modules | protected static | property | Overrides SaveUploadTest::$modules | |
RemoteFileSaveUploadTest::setUp | protected | function | Overrides SaveUploadTest::setUp | |
SaveUploadTest::$account | protected | property | The user used by the test. | |
SaveUploadTest::$image | protected | property | An image file path for uploading. | |
SaveUploadTest::$imageExtension | protected | property | Extension of the image filename. | |
SaveUploadTest::$maxFidBefore | protected | property | The largest file id when the test starts. | |
SaveUploadTest::$phpFile | protected | property | A PHP file path for upload security testing. | |
SaveUploadTest::testDrupalMovingUploadedFileError | public | function | Tests for log entry on failing destination. | |
SaveUploadTest::testDuplicate | public | function | Tests uploading a duplicate file. | |
SaveUploadTest::testExistingError | public | function | Tests for failure when uploading over a file that already exists. | |
SaveUploadTest::testExistingRename | public | function | Tests renaming when uploading over a file that already exists. | |
SaveUploadTest::testExistingReplace | public | function | Tests replacement when uploading over a file that already exists. | |
SaveUploadTest::testHandleDangerousFile | public | function | Tests dangerous file handling. | |
SaveUploadTest::testHandleDotFile | public | function | Test dangerous file handling. | |
SaveUploadTest::testHandleExtension | public | function | Tests extension handling. | |
SaveUploadTest::testHandleFileMunge | public | function | Tests file munge handling. | |
SaveUploadTest::testInvalidUtf8FilenameUpload | public | function | Tests that filenames containing invalid UTF-8 are rejected. | |
SaveUploadTest::testNormal | public | function | Tests the file_save_upload() function. | |
SaveUploadTest::testNoUpload | public | function | Tests for no failures when not uploading a file. | |
SaveUploadTest::testRequired | public | function | Tests the file_save_upload() function when the field is required. | |
SaveUploadTest::testSanitization | public | function | Tests filename sanitization. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.