protected function SpaceUsedTest::setUp in Drupal 8
Same name and namespace in other branches
- 9 core/modules/file/tests/src/Kernel/SpaceUsedTest.php \Drupal\Tests\file\Kernel\SpaceUsedTest::setUp()
- 10 core/modules/file/tests/src/Kernel/SpaceUsedTest.php \Drupal\Tests\file\Kernel\SpaceUsedTest::setUp()
Overrides FileManagedUnitTestBase::setUp
File
- core/
modules/ file/ tests/ src/ Kernel/ SpaceUsedTest.php, line 14
Class
- SpaceUsedTest
- Tests the spaceUsed() function.
Namespace
Drupal\Tests\file\KernelCode
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);
}