Fix phpunit
This commit is contained in:
parent
d723a5873f
commit
22921ad26b
@ -535,5 +535,6 @@ CREATE TABLE IF NOT EXISTS llx_propal_merge_pdf_product (
|
|||||||
|
|
||||||
-- Feature request: A page to merge two thirdparties into one #2613
|
-- Feature request: A page to merge two thirdparties into one #2613
|
||||||
ALTER TABLE llx_categorie_societe CHANGE COLUMN fk_societe fk_soc INTEGER NOT NULL;
|
ALTER TABLE llx_categorie_societe CHANGE COLUMN fk_societe fk_soc INTEGER NOT NULL;
|
||||||
|
ALTER TABLE llx_categorie_fournisseur CHANGE COLUMN fk_societe fk_soc INTEGER NOT NULL;
|
||||||
ALTER TABLE llx_societe CHANGE COLUMN fk_societe fk_soc INTEGER NOT NULL;
|
ALTER TABLE llx_societe CHANGE COLUMN fk_societe fk_soc INTEGER NOT NULL;
|
||||||
ALTER TABLE llx_user CHANGE COLUMN fk_societe fk_soc INTEGER NOT NULL;
|
ALTER TABLE llx_user CHANGE COLUMN fk_societe fk_soc INTEGER NOT NULL;
|
||||||
|
|||||||
@ -263,12 +263,12 @@ class AdherentTest extends PHPUnit_Framework_TestCase
|
|||||||
$result=$localobject->update($user);
|
$result=$localobject->update($user);
|
||||||
print __METHOD__." id=".$localobject->id." result=".$result."\n";
|
print __METHOD__." id=".$localobject->id." result=".$result."\n";
|
||||||
$this->assertLessThan($result, 0);
|
$this->assertLessThan($result, 0);
|
||||||
$result=$localobject->update_note($localobject->note);
|
$result=$localobject->update_note($localobject->note,'_private');
|
||||||
|
print __METHOD__." id=".$localobject->id." result=".$result."\n";
|
||||||
|
$this->assertLessThan($result, 0);
|
||||||
|
$result=$localobject->update_note_public($localobject->note,'_public');
|
||||||
print __METHOD__." id=".$localobject->id." result=".$result."\n";
|
print __METHOD__." id=".$localobject->id." result=".$result."\n";
|
||||||
$this->assertLessThan($result, 0);
|
$this->assertLessThan($result, 0);
|
||||||
//$result=$localobject->update_note_public($localobject->note_public);
|
|
||||||
//print __METHOD__." id=".$localobject->id." result=".$result."\n";
|
|
||||||
//$this->assertLessThan($result, 0);
|
|
||||||
|
|
||||||
$newobject=new Adherent($this->savdb);
|
$newobject=new Adherent($this->savdb);
|
||||||
$result=$newobject->fetch($localobject->id);
|
$result=$newobject->fetch($localobject->id);
|
||||||
@ -278,8 +278,7 @@ class AdherentTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertEquals($localobject->civility_id, $newobject->civility_id);
|
$this->assertEquals($localobject->civility_id, $newobject->civility_id);
|
||||||
$this->assertEquals($localobject->login, $newobject->login);
|
$this->assertEquals($localobject->login, $newobject->login);
|
||||||
$this->assertEquals($localobject->societe, $newobject->societe);
|
$this->assertEquals($localobject->societe, $newobject->societe);
|
||||||
$this->assertEquals($localobject->note, $newobject->note);
|
$this->assertEquals($localobject->note_public, $newobject->note_public);
|
||||||
//$this->assertEquals($localobject->note_public, $newobject->note_public);
|
|
||||||
$this->assertEquals($localobject->lastname, $newobject->lastname);
|
$this->assertEquals($localobject->lastname, $newobject->lastname);
|
||||||
$this->assertEquals($localobject->firstname, $newobject->firstname);
|
$this->assertEquals($localobject->firstname, $newobject->firstname);
|
||||||
$this->assertEquals($localobject->address, $newobject->address);
|
$this->assertEquals($localobject->address, $newobject->address);
|
||||||
|
|||||||
@ -142,4 +142,21 @@ class AdminLibTest extends PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* testEnableModule
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function testEnableModule()
|
||||||
|
{
|
||||||
|
global $conf, $db, $langs, $user;
|
||||||
|
|
||||||
|
require_once dirname(__FILE__).'/../../htdocs/core/modules/modExpenseReport.class.php';
|
||||||
|
print "Enable module modExpenseReport";
|
||||||
|
$moduledescriptor=new modExpenseReport($db);
|
||||||
|
$moduledescriptor->init();
|
||||||
|
$conf->setValues($db);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -31,6 +31,8 @@ global $conf,$user,$langs,$db;
|
|||||||
//require_once 'PHPUnit/Autoload.php';
|
//require_once 'PHPUnit/Autoload.php';
|
||||||
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
|
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if ($langs->defaultlang != 'en_US')
|
if ($langs->defaultlang != 'en_US')
|
||||||
{
|
{
|
||||||
print "Error: Default language for company to run tests must be set to en_US or auto. Current is ".$langs->defaultlang."\n";
|
print "Error: Default language for company to run tests must be set to en_US or auto. Current is ".$langs->defaultlang."\n";
|
||||||
@ -61,6 +63,7 @@ class AllTests
|
|||||||
*/
|
*/
|
||||||
public static function suite()
|
public static function suite()
|
||||||
{
|
{
|
||||||
|
|
||||||
$suite = new PHPUnit_Framework_TestSuite('PHPUnit Framework');
|
$suite = new PHPUnit_Framework_TestSuite('PHPUnit Framework');
|
||||||
|
|
||||||
//require_once dirname(__FILE__).'/CoreTest.php';
|
//require_once dirname(__FILE__).'/CoreTest.php';
|
||||||
|
|||||||
@ -106,10 +106,6 @@ class BuildDocTest extends PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
|
|
||||||
print "Enable module modExpenseReport";
|
|
||||||
$moduledescriptor=new modExpenseReport($db);
|
|
||||||
$moduledescriptor->init();
|
|
||||||
|
|
||||||
if (! $conf->facture->enabled) { print __METHOD__." invoice module not enabled\n"; die(); }
|
if (! $conf->facture->enabled) { print __METHOD__." invoice module not enabled\n"; die(); }
|
||||||
if (! $conf->commande->enabled) { print __METHOD__." order module not enabled\n"; die(); }
|
if (! $conf->commande->enabled) { print __METHOD__." order module not enabled\n"; die(); }
|
||||||
if (! $conf->propal->enabled) { print __METHOD__." propal module not enabled\n"; die(); }
|
if (! $conf->propal->enabled) { print __METHOD__." propal module not enabled\n"; die(); }
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user