Try phpunit fix
This commit is contained in:
parent
1fadb2dfb6
commit
5446a7bd8e
@ -39,8 +39,11 @@ $langs->load("main");
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class BillOfMaterialsTest
|
* Class for PHPUnit tests
|
||||||
* @package Testbillofmaterials
|
*
|
||||||
|
* @backupGlobals disabled
|
||||||
|
* @backupStaticAttributes enabled
|
||||||
|
* @remarks backupGlobals must be disabled to have db,conf,user and lang not erased.
|
||||||
*/
|
*/
|
||||||
class BOMTest extends PHPUnit\Framework\TestCase
|
class BOMTest extends PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
@ -77,13 +80,6 @@ class BOMTest extends PHPUnit\Framework\TestCase
|
|||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
|
$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
|
||||||
|
|
||||||
if (! empty($conf->global->MAIN_FIRSTNAME_NAME_POSITION)) {
|
|
||||||
print "\n".__METHOD__." Company must be setup to have name-firstname in order 'Firstname Lastname'\n";
|
|
||||||
die();
|
|
||||||
}
|
|
||||||
if (! empty($conf->global->MAIN_MODULE_LDAP)) { print "\n".__METHOD__." module LDAP must be disabled.\n"; die(); }
|
|
||||||
if (! empty($conf->global->MAIN_MODULE_MAILMANSPIP)) { print "\n".__METHOD__." module MailmanSpip must be disabled.\n"; die(); }
|
|
||||||
|
|
||||||
print __METHOD__."\n";
|
print __METHOD__."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -142,6 +138,6 @@ class BOMTest extends PHPUnit\Framework\TestCase
|
|||||||
print __METHOD__." result=".$result."\n";
|
print __METHOD__." result=".$result."\n";
|
||||||
$this->assertLessThan($result, 0);
|
$this->assertLessThan($result, 0);
|
||||||
|
|
||||||
return $localobject;
|
return $result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user