mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-09 10:32:50 +01:00
Fix: The way we tested if a ref/id already exists was wrong. Introduce a
common static method for this. Removed verifNumRef method. Fix: Add missing logs
This commit is contained in:
@@ -185,7 +185,7 @@ class ProjectTest extends PHPUnit_Framework_TestCase
|
||||
$this->assertLessThan($result, 0);
|
||||
return $localobject;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* testProjectOther
|
||||
*
|
||||
@@ -232,27 +232,5 @@ class ProjectTest extends PHPUnit_Framework_TestCase
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* testVerifyNumRef
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testVerifyNumRef()
|
||||
{
|
||||
global $conf,$user,$langs,$db;
|
||||
$conf=$this->savconf;
|
||||
$user=$this->savuser;
|
||||
$langs=$this->savlangs;
|
||||
$db=$this->savdb;
|
||||
|
||||
$localobject=new Project($this->savdb);
|
||||
$result=$localobject->ref='refthatdoesnotexists';
|
||||
$result=$localobject->VerifyNumRef();
|
||||
|
||||
print __METHOD__." result=".$result."\n";
|
||||
$this->assertEquals($result, 0);
|
||||
return $result;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user