protected function setUp() { parent::setUp(); $this->image = File::create(); $this->image->setFileUri('core/misc/druplicon.png'); $this->image->setFilename(drupal_basename($this->image->getFileUri())); $this->nonImage = File::create(); $this->nonImage->setFileUri('core/assets/vendor/jquery/jquery.min.js'); $this->nonImage->setFilename(drupal_basename($this->nonImage->getFileUri())); }
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); }