dolibarr-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Dolibarr-dev] [dolibarr] add more test case for ContactTest.php (90


From: ray
Subject: Re: [Dolibarr-dev] [dolibarr] add more test case for ContactTest.php (904d1ba)
Date: Wed, 10 Apr 2013 00:14:57 +0800

>All tests that are after iniAsSpecimen like this
>
>+      print __METHOD__." lastname=".$localobject->lastname."\n";
>+      $this->assertEquals($localobject->lastname, 'DOLIBARR');
>+      print __METHOD__." firstname=".$localobject->firstname."\n";
>+      $this->assertEquals($localobject->firstname, 'SPECIMEN');
>
>are useless. Because initAsSpecimen is a function available to help to test 
>business function. We don't need to tests that functions available to test 
>business function are ok. What we need to test are business functions and not 
>tests tools.
>
>
>For interesting part of code, (other branches of getFullAddress), you should 
>use a more complete test than assertContains("New address"). This chech only 
>that ther is New adress into address. But we are sure of that already. What we 
>want to know is that full address is correctly formatted (with all fields, no 
>more, no less) and into correct order according to country.

Thanks for review. I will modify it and post a new pull request. thanks


Ray

reply via email to

[Prev in Thread] Current Thread [Next in Thread]