function ImageTest::testParseFileFails
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Image/ImageTest.php \Drupal\Tests\Core\Image\ImageTest::testParseFileFails()
- 8.9.x core/tests/Drupal/Tests/Core/Image/ImageTest.php \Drupal\Tests\Core\Image\ImageTest::testParseFileFails()
- 10 core/tests/Drupal/Tests/Core/Image/ImageTest.php \Drupal\Tests\Core\Image\ImageTest::testParseFileFails()
Tests \Drupal\Core\Image\Image::parseFile().
File
-
core/
tests/ Drupal/ Tests/ Core/ Image/ ImageTest.php, line 284
Class
- ImageTest
- Tests the image class.
Namespace
Drupal\Tests\Core\ImageCode
public function testParseFileFails() : void {
$toolkit = $this->getToolkitMock();
$image = new Image($toolkit, 'magic-foobar.png');
$this->assertFalse($image->isValid());
$this->assertFalse($image->save());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.