public function TextimageApiTest::testSetInvalidTargetUri in Textimage 8.3
Test targeting invalid URIs.
File
- tests/
src/ Kernel/ TextimageApiTest.php, line 350
Class
- TextimageApiTest
- Kernel tests for Textimage API.
Namespace
Drupal\Tests\textimage\KernelCode
public function testSetInvalidTargetUri() {
$textimage = $this->textimageFactory
->get();
$this
->setExpectedException(TextimageException::class, 'Textimage error: Invalid target URI \'bingo://textimage-testing/bingo-bongo.png\' specified');
$textimage
->setTargetUri('bingo://textimage-testing/bingo-bongo.png');
$this
->setExpectedException(TextimageException::class, 'Textimage error: Invalid target URI \'public://textimage-testing/bingo' . chr(1) . '.png\' specified');
$textimage
->setTargetUri('public://textimage-testing/bingo' . chr(1) . '.png');
}