function ImageStylesPathAndUrlTest::setUp

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

Overrides BrowserTestBase::setUp

File

core/modules/image/tests/src/Functional/ImageStylesPathAndUrlTest.php, line 47

Class

ImageStylesPathAndUrlTest
Tests the functions for generating paths and URLs for image styles.

Namespace

Drupal\Tests\image\Functional

Code

protected function setUp() : void {
    parent::setUp();
    $this->style = ImageStyle::create([
        'name' => 'style_foo',
        'label' => $this->randomString(),
    ]);
    $this->style
        ->save();
    // Create a new language.
    ConfigurableLanguage::createFromLangcode('fr')->save();
}

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