[Network] [Tests] Ported MailTest to LunrBaseTest,updated relevant methods

Review Request #214 — Created Oct. 28, 2013 and discarded

andrea
Lunr
unit_refactoring
234
lunr
Made Network\Tests\MailTest extend from LunrBaseTest instead of PHPUnit framework directly.
Three files are related and their methods have been updated as well:
MailBaseTest, MailSendTest, MailSetTest.
Unit Tests
  • 0
  • 0
  • 3
  • 0
  • 3
Description From Last Updated
pprkut
  1. 
      
  2. src/Lunr/Network/Tests/MailSendTest.php (Diff revision 1)
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    Please also port these to the new function mock methods
  3. 
      
andrea
pprkut
  1. 
      
  2. src/Lunr/Network/Tests/MailSendTest.php (Diff revisions 1 - 2)
     
     
    it still requires the runkit extension. Just because the function calls are now somewhere else doesn't mean they work without runkit being installed.
  3. 
      
andrea
pprkut
  1. 
      
  2. src/Lunr/Network/Tests/MailBaseTest.php (Diff revision 3)
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    Please keep those tests separate.
    1. Ok, git will do it for me. But why? I'm having a hard time understanding what I can and cannot do whenever I touch the code.
      What's the problem in grouping them like this? Is not the first time a Provider is used.
    2. I get it, it's a bit fuzzy. Usually a test should not test more than one method/function. However, here we are not testing a method or a function so that reasoning doesn't really apply. So it all boils down to "we don't do that anywhere else". That in itself doesn't mean we can't change it, but then it needs to be done with the intention of doing it everywhere else too (over time, not all at once). And for changing it everywhere else there'd need to be a good reason why we would want to spend the effort. We have that reason for migrating to LunrBaseTest and we have it for using the function mock methods. But I don't really see a tangible benefit here, other than "less code".
  3. 
      
andrea
Review request changed

Status: Discarded

Change Summary:

Superseded by http://reviews.lunr.nl/r/242/
Loading...