Merge pull request #495 from tobald/unittest_fixes
Provide some unit test fixes
This commit is contained in:
parent
21e6353314
commit
bd03632163
|
@ -178,7 +178,8 @@ class DB_Sql {
|
|||
}
|
||||
|
||||
if( defined("THROW_EXCEPTIONS") && THROW_EXCEPTIONS ){
|
||||
throw new \Exception("Mysql query failed : $this->Error");
|
||||
$error_msg=$this->Error[2];
|
||||
throw new \Exception("Mysql query failed : $error_msg");
|
||||
}
|
||||
$this->halt("SQL Error: ".$Query_String);
|
||||
return FALSE;
|
||||
|
|
|
@ -325,7 +325,7 @@ class m_action {
|
|||
*/
|
||||
function reset_job($id) {
|
||||
global $db, $msg;
|
||||
if (!$db->query("update actions set end=0,begin=0,status='' where id= ?;", array($id))) {
|
||||
if (!$db->query("update actions set end=0,begin=0,status=0 where id= ?;", array($id))) {
|
||||
$msg->raise("ERROR", "action", _("Error unlocking the action : $id"));
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -944,7 +944,7 @@ class m_dom {
|
|||
$out=array();
|
||||
exec("dig +short NS ".escapeshellarg($parent),$out);
|
||||
$loopmax--;
|
||||
} while (!count($out) && $loopmax); // will stop when : we have no parent, or
|
||||
} while (!count($out) && $loopmax && strpos($parent, '.'));
|
||||
if (!count($out)) {
|
||||
return false; // bad exit of the loop
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
actions:
|
||||
-
|
||||
id: 999
|
||||
type: "file"
|
||||
type: CREATE_FILE
|
||||
parameters: "phpunit"
|
||||
creation: "2000-01-01 00:00:00"
|
||||
begin: "2020-12-31 23:59:58"
|
||||
end: "2020-12-31 23:59:59"
|
||||
user: "phpunit"
|
||||
status: 0
|
||||
status: 0
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
actions:
|
||||
-
|
||||
id: 999
|
||||
type: "file"
|
||||
type: CREATE_FILE
|
||||
parameters: "phpunit"
|
||||
creation: "2000-01-01 00:00:00"
|
||||
begin: "0000-00-00 00:00:00"
|
||||
end: "0000-00-00 00:00:00"
|
||||
user: "phpunit"
|
||||
status: 0
|
||||
status: 0
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
actions:
|
||||
-
|
||||
id: 999
|
||||
type: "file"
|
||||
type: CREATE_FILE
|
||||
parameters: "phpunit"
|
||||
creation: "2000-01-01 00:00:00"
|
||||
begin: "2020-12-31 23:59:58"
|
||||
end: "0000-00-00 00:00:00"
|
||||
user: "phpunit"
|
||||
status: 0
|
||||
status: 0
|
||||
|
|
|
@ -350,6 +350,7 @@ class m_domTest extends TestCase
|
|||
{
|
||||
// Remove the following lines when you implement this test.
|
||||
$ns = $this->object->whois('alternc.org');
|
||||
sort($ns);
|
||||
$expected_ns = array(
|
||||
'primary.heberge.info',
|
||||
'secondary.heberge.info',
|
||||
|
|
Loading…
Reference in New Issue