function ImageTest::testInvalidGetKeywordOffset

@covers ::getKeywordOffset

File

core/tests/Drupal/Tests/Component/Utility/ImageTest.php, line 163

Class

ImageTest
@coversDefaultClass \Drupal\Component\Utility\Image @group Image

Namespace

Drupal\Tests\Component\Utility

Code

public function testInvalidGetKeywordOffset() : void {
    $this->expectException(\InvalidArgumentException::class);
    $this->expectExceptionMessage('Invalid anchor \'foo\' provided to getKeywordOffset()');
    Image::getKeywordOffset('foo', 0, 0);
}

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