public function ImageEffectsTestBase::setUp in Image Effects 8
Same name and namespace in other branches
- 8.3 tests/src/Functional/ImageEffectsTestBase.php \Drupal\Tests\image_effects\Functional\ImageEffectsTestBase::setUp()
- 8.2 tests/src/Functional/ImageEffectsTestBase.php \Drupal\Tests\image_effects\Functional\ImageEffectsTestBase::setUp()
Overrides BrowserTestBase::setUp
2 calls to ImageEffectsTestBase::setUp()
- AspectSwitcherTest::setUp in tests/
src/ Functional/ Effect/ AspectSwitcherTest.php - AutoOrientTest::setUp in tests/
src/ Functional/ Effect/ AutoOrientTest.php
2 methods override ImageEffectsTestBase::setUp()
- AspectSwitcherTest::setUp in tests/
src/ Functional/ Effect/ AspectSwitcherTest.php - AutoOrientTest::setUp in tests/
src/ Functional/ Effect/ AutoOrientTest.php
File
- tests/
src/ Functional/ ImageEffectsTestBase.php, line 73
Class
- ImageEffectsTestBase
- Base test class for image_effects tests.
Namespace
Drupal\Tests\image_effects\FunctionalCode
public function setUp() {
parent::setUp();
// Set the image factory.
$this->imageFactory = $this->container
->get('image.factory');
// Create a user and log it in.
$this->adminUser = $this
->drupalCreateUser([
'administer site configuration',
'administer image styles',
]);
$this
->drupalLogin($this->adminUser);
// Create the test image style.
$this->testImageStyle = ImageStyle::create([
'name' => $this->testImageStyleName,
'label' => $this->testImageStyleLabel,
]);
$this
->assertEqual(SAVED_NEW, $this->testImageStyle
->save());
}