function ImageTest::testIsValid

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Image/ImageTest.php \Drupal\Tests\Core\Image\ImageTest::testIsValid()
  2. 8.9.x core/tests/Drupal/Tests/Core/Image/ImageTest.php \Drupal\Tests\Core\Image\ImageTest::testIsValid()
  3. 10 core/tests/Drupal/Tests/Core/Image/ImageTest.php \Drupal\Tests\Core\Image\ImageTest::testIsValid()

Tests \Drupal\Core\Image\Image::isValid().

File

core/tests/Drupal/Tests/Core/Image/ImageTest.php, line 196

Class

ImageTest
Tests the image class.

Namespace

Drupal\Tests\Core\Image

Code

public function testIsValid() : void {
    $this->getTestImage(FALSE);
    $this->assertTrue($this->image
        ->isValid());
    $this->assertFileIsReadable($this->image
        ->getSource());
}

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