From dd491a51976f8a7bb41b69055b75283d40bcb8cb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Fri, 17 Feb 2012 01:41:58 +0100 Subject: [PATCH] Add more phpunit --- test/phpunit/SocieteTest.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/phpunit/SocieteTest.php b/test/phpunit/SocieteTest.php index 050488a6e65..2bf78f5878c 100755 --- a/test/phpunit/SocieteTest.php +++ b/test/phpunit/SocieteTest.php @@ -266,6 +266,24 @@ class SocieteTest extends PHPUnit_Framework_TestCase print __METHOD__." localobject->date_creation=".$localobject->date_creation."\n"; $this->assertNotEquals($localobject->date_creation, ''); + $localobject->idprof1=493861496; + $localobject->idprof2=49386149600021; + $result=$localobject->id_prof_check(1,$localobject); + print __METHOD__." result=".$result."\n"; + $this->assertLessThan($result, 0); + $result=$localobject->id_prof_check(2,$localobject); + print __METHOD__." result=".$result."\n"; + $this->assertLessThan($result, 0); + + $localobject->idprof1='id1ko'; + $localobject->idprof2='id2ko'; + $result=$localobject->id_prof_check(1,$localobject); + print __METHOD__." result=".$result."\n"; + $this->assertGreaterThan($result, 0); + $result=$localobject->id_prof_check(2,$localobject); + print __METHOD__." result=".$result."\n"; + $this->assertGreaterThan($result, 0); + return $localobject->id; } -- GitLab