function SpaceUsedTest::setUp
Overrides FileManagedUnitTestBase::setUp
File
- 
              core/modules/ file/ tests/ src/ Kernel/ SpaceUsedTest.php, line 18 
Class
- SpaceUsedTest
- Tests the spaceUsed() function.
Namespace
Drupal\Tests\file\KernelCode
protected function setUp() : void {
  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);
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
