function FileMoveTest::setUp

Same name in other branches
  1. 9 core/modules/image/tests/src/Functional/FileMoveTest.php \Drupal\Tests\image\Functional\FileMoveTest::setUp()
  2. 10 core/modules/image/tests/src/Kernel/FileMoveTest.php \Drupal\Tests\image\Kernel\FileMoveTest::setUp()

Overrides KernelTestBase::setUp

File

core/modules/image/tests/src/Kernel/FileMoveTest.php, line 44

Class

FileMoveTest
Tests the file move function for images and image styles.

Namespace

Drupal\Tests\image\Kernel

Code

protected function setUp() : void {
    parent::setUp();
    $this->installConfig([
        'system',
    ]);
    $this->installEntitySchema('file');
    $this->installEntitySchema('user');
    $this->installSchema('file', [
        'file_usage',
    ]);
    ImageStyle::create([
        'name' => 'main_style',
        'label' => 'Main',
    ])->save();
    $this->fileRepository = $this->container
        ->get('file.repository');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.