Fix phpunit
This commit is contained in:
parent
168ff1a806
commit
51b03e358e
@ -843,7 +843,7 @@ class SupplierProposal extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function create($user, $notrigger=0)
|
function create($user, $notrigger=0)
|
||||||
{
|
{
|
||||||
global $langs,$conf,$mysoc,$hookmanager;
|
global $langs, $conf, $mysoc, $hookmanager;
|
||||||
$error=0;
|
$error=0;
|
||||||
|
|
||||||
$now=dol_now();
|
$now=dol_now();
|
||||||
|
|||||||
@ -203,8 +203,8 @@ class SupplierProposalTest extends PHPUnit_Framework_TestCase
|
|||||||
/**
|
/**
|
||||||
* testSupplierProposalValid
|
* testSupplierProposalValid
|
||||||
*
|
*
|
||||||
* @param Proposal $localobject Proposal
|
* @param SupplierProposal $localobject Proposal
|
||||||
* @return Proposal
|
* @return SupplierProposal
|
||||||
*
|
*
|
||||||
* @depends testSupplierProposalAddLine
|
* @depends testSupplierProposalAddLine
|
||||||
* The depends says test is run only if previous is ok
|
* The depends says test is run only if previous is ok
|
||||||
@ -217,7 +217,14 @@ class SupplierProposalTest extends PHPUnit_Framework_TestCase
|
|||||||
$langs=$this->savlangs;
|
$langs=$this->savlangs;
|
||||||
$db=$this->savdb;
|
$db=$this->savdb;
|
||||||
|
|
||||||
|
$result = $user->addrights(0, 'supplier_proposal');
|
||||||
|
$this->assertLessThan($result, 0);
|
||||||
|
|
||||||
|
$result = $user->getrights('supplier_proposal', 1);
|
||||||
|
//$this->assertLessThan($result, 0);
|
||||||
|
|
||||||
$result=$localobject->valid($user);
|
$result=$localobject->valid($user);
|
||||||
|
$this->assertLessThan($result, 0);
|
||||||
|
|
||||||
print __METHOD__." id=".$localobject->id." result=".$result."\n";
|
print __METHOD__." id=".$localobject->id." result=".$result."\n";
|
||||||
$this->assertLessThan($result, 0);
|
$this->assertLessThan($result, 0);
|
||||||
@ -227,7 +234,7 @@ class SupplierProposalTest extends PHPUnit_Framework_TestCase
|
|||||||
/**
|
/**
|
||||||
* testSupplierProposalOther
|
* testSupplierProposalOther
|
||||||
*
|
*
|
||||||
* @param Proposal $localobject Proposal
|
* @param SupplierProposal $localobject Proposal
|
||||||
* @return int
|
* @return int
|
||||||
*
|
*
|
||||||
* @depends testSupplierProposalValid
|
* @depends testSupplierProposalValid
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user