function ImageTest::testIsValid

Same name in other branches
  1. 8.9.x core/tests/Drupal/Tests/Core/Image/ImageTest.php \Drupal\Tests\Core\Image\ImageTest::testIsValid()
  2. 10 core/tests/Drupal/Tests/Core/Image/ImageTest.php \Drupal\Tests\Core\Image\ImageTest::testIsValid()
  3. 11.x 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 192

Class

ImageTest
Tests the image class.

Namespace

Drupal\Tests\Core\Image

Code

public function testIsValid() {
    $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.