protected function TextimageApiTest::assertTextimageException in Textimage 7.3
Assert throwing of a TextimageException.
1 call to TextimageApiTest::assertTextimageException()
- TextimageApiTest::testTextimageApi in tests/
textimage.test - Test functionality of the API.
File
- tests/
textimage.test, line 659 - Textimage - web test case script.
Class
- TextimageApiTest
- Functional tests for Textimage API.
Code
protected function assertTextimageException($expected, $callback, $param_arr) {
try {
call_user_func_array($callback, $param_arr);
$this
->assertTrue(!$expected, 'Exception not raised.');
} catch (TextimageException $e) {
$this
->assertTrue($expected, $e
->getMessage());
}
}