You are here

public function ImageTest::testIsValid in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Image/ImageTest.php \Drupal\Tests\Core\Image\ImageTest::testIsValid()
  2. 9 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());
}