protected function ValidatorTest::setUp in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/file/src/Tests/ValidatorTest.php \Drupal\file\Tests\ValidatorTest::setUp()
Performs setup tasks before each individual test method is run.
Overrides FileManagedUnitTestBase::setUp
File
- core/
modules/ file/ src/ Tests/ ValidatorTest.php, line 31 - Contains \Drupal\file\Tests\ValidatorTest.
Class
- ValidatorTest
- Tests the functions used to validate uploaded files.
Namespace
Drupal\file\TestsCode
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()));
}