MDL-56122 editpdf: Fix ghostscript checking
This commit is contained in:
@@ -525,7 +525,7 @@ class pdf extends \FPDI {
|
||||
/**
|
||||
* Test that the configured path to ghostscript is correct and working.
|
||||
* @param bool $generateimage - If true - a test image will be generated to verify the install.
|
||||
* @return bool
|
||||
* @return stdClass
|
||||
*/
|
||||
public static function test_gs_path($generateimage = true) {
|
||||
global $CFG;
|
||||
|
||||
@@ -45,7 +45,8 @@ class assignfeedback_editpdf_testcase extends mod_assign_base_testcase {
|
||||
|
||||
protected function setUp() {
|
||||
// Skip this test if ghostscript is not supported.
|
||||
if (!pdf::test_gs_path(false)) {
|
||||
$result = pdf::test_gs_path(false);
|
||||
if ($result->status !== assignfeedback_editpdf\pdf::GSPATH_OK) {
|
||||
$this->markTestSkipped('Ghostscript not setup');
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user