[Flare] [Tests] Ported VerificationTest to LunrBaseTest,updated relevant methods

Review Request #213 — Created Oct. 28, 2013 and submitted

andrea
Lunr
unit_refactoring
lunr
Made Flare\Tests\VerificationTest extend from LunrBaseTest instead of PHPUnit framework directly.
Five files are related and their methods have been updated as well:
VerificationBaseTest, VerificationChecksTest, VerificationNullPointerTest, VerificationResultTest, VerificationSetTest.
Unit tests.
  • 0
  • 0
  • 0
  • 3
  • 3
Description From Last Updated
dinos
  1. 
      
  2. src/Lunr/Flare/Tests/VerificationBaseTest.php (Diff revision 1)
     
     
     
     
     
     
     
    There is a function assertPropertyEmpty(), which I also discovered today
    1. I noticed, but I'm also trying to assert that it's an Array. I checked into assertPropertyEmpty but it doesn't assume array. I'm not sure what's best to use here, since using assertInstanceOf('array', $value) would still require me to fill $value.
    2. I think it will be useful in other occasion, though. For what I've seen assertPropertyTrue/False/Null would be useful to have in LunrBaseTest, but missing.
    3. assertArrayEmpty($this->get_reflection_property_value('property'));
      
      is what I usually do in those situations.
      
      I'm not opposed to adding other helper methods to LunrBaseTest. For now I haven't seen the need though to do it myself. Patches welcome :)
    4. Ok, since there is no much difference in saving it in $value and pass it to the assertion from what you'd do, I think this one should go in without further changes.
      If I add such helper methods, the others "tests refactoring" tasks will be updated accordingly.
      I will add one commit to the right codereviews when the change in LunrBaseTest is made.
    5. wfm
  3. src/Lunr/Flare/Tests/VerificationBaseTest.php (Diff revision 1)
     
     
     
     
     
    here too
  4. src/Lunr/Flare/Tests/VerificationBaseTest.php (Diff revision 1)
     
     
     
     
     
    here too
  5. 
      
pprkut
  1. Ship It!
  2. 
      
andrea
Review request changed

Status: Closed (submitted)

Change Summary:

Merged into master
Loading...