protected function SpaceUsedTest::setUp in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/file/src/Tests/SpaceUsedTest.php \Drupal\file\Tests\SpaceUsedTest::setUp()
Performs setup tasks before each individual test method is run.
Overrides FileManagedUnitTestBase::setUp
File
- core/
modules/ file/ src/ Tests/ SpaceUsedTest.php, line 16 - Contains \Drupal\file\Tests\SpaceUsedTest.
Class
- SpaceUsedTest
- Tests the spaceUsed() function.
Namespace
Drupal\file\TestsCode
protected function setUp() {
parent::setUp();
// Create records for a couple of users with different sizes.
$this
->createFileWithSize('public://example1.txt', 50, 2);
$this
->createFileWithSize('public://example2.txt', 20, 2);
$this
->createFileWithSize('public://example3.txt', 100, 3);
$this
->createFileWithSize('public://example4.txt', 200, 3);
// Now create some non-permanent files.
$this
->createFileWithSize('public://example5.txt', 1, 2, 0);
$this
->createFileWithSize('public://example6.txt', 3, 3, 0);
}