Example #1
0
 protected function setUp()
 {
     parent::setUp();
     $this->image = entity_create('file');
     $this->image->setFileUri('core/misc/druplicon.png');
     $this->image->setFilename(drupal_basename($this->image->getFileUri()));
     $this->nonImage = entity_create('file');
     $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);
 }