You are here

public function TextimageApiTest::testSetInvalidTargetUriScheme in Textimage 8.4

Test targeting invalid URIs.

File

tests/src/Kernel/TextimageApiTest.php, line 409

Class

TextimageApiTest
Kernel tests for Textimage API.

Namespace

Drupal\Tests\textimage\Kernel

Code

public function testSetInvalidTargetUriScheme() {
  $textimage = $this->textimageFactory
    ->get();
  $this
    ->expectException(TextimageException::class);
  $this
    ->expectExceptionMessage('Textimage error: Invalid target URI \'bingo://textimage-testing/bingo-bongo.png\' specified');
  $textimage
    ->setTargetUri('bingo://textimage-testing/bingo-bongo.png');
}