This is my solution for TDD Kata 3 of Roy Osherove
Create a Password verifications class called “PasswordVerifier”.
- Add the following verifications to a master function called “verify()”
- password should be larger than 8 chars
- password should not be null
- password should have one uppercase letter at least
- password should have one lowercase letter at least
- password should have one number at least
Each one of these should return true if the validation is ok.
-
Add feature: Password is OK if at least three of the previous conditions is true
-
Add feature: password is never OK if item 1.4 is not true.
composer install
./bin/phpspec run