Laravel-Testing-Decoded
Laravel-Testing-Decoded copied to clipboard
Page 111 (PDF) Tests differ after refactoring
Small point, but it was initially confusing to me. The refactored app/tests/models/AuthorTest.php code (page 111, PDF) differs, in what it tests for, from the original code (page 107, PDF).
The original testIsInvalidWithoutAValidEmail() method tests not for the presence of the email value but rather the validity of the email address format. While the refactored code is not semantically incorrect; it doesn't test the same thing.