MDL-56122 editpdf: Fix ghostscript checking

This commit is contained in:
David Monllao
2017-02-14 13:45:39 +01:00
parent cc36a37ea4
commit 69c5e60f8c
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -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;
}