From ce7a96cbf117418aed995a7cc84a645e925ca747 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 1 Nov 2020 20:11:09 +0100 Subject: [PATCH] Add more assertion --- htdocs/core/class/conf.class.php | 2 ++ test/phpunit/AdminLibTest.php | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 56e8f313129..5bb441ceb0a 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -738,5 +738,7 @@ class Conf } } } + + return 0; } } diff --git a/test/phpunit/AdminLibTest.php b/test/phpunit/AdminLibTest.php index e3c38c1df86..c7b5aee9e37 100644 --- a/test/phpunit/AdminLibTest.php +++ b/test/phpunit/AdminLibTest.php @@ -165,13 +165,17 @@ class AdminLibTest extends PHPUnit\Framework\TestCase require_once dirname(__FILE__).'/../../htdocs/core/modules/modExpenseReport.class.php'; print "Enable module modExpenseReport"; $moduledescriptor=new modExpenseReport($db); - $moduledescriptor->init(); + $result = $moduledescriptor->init(); + print __METHOD__." result=".$result."\n"; + $this->assertEquals(1, $result); $conf->setValues($db); require_once dirname(__FILE__).'/../../htdocs/core/modules/modApi.class.php'; print "Enable module modAPI"; $moduledescriptor=new modApi($db); - $moduledescriptor->init(); + $result = $moduledescriptor->init(); + print __METHOD__." result=".$result."\n"; + $this->assertEquals(1, $result); $conf->setValues($db); } }