A simple PHP project to learn TDD
My post in Medium about the code
Your task is to build Class called Wrapper and its method called wrap.
You have to implement all tasks to pass all tests.
- implement testItShouldWrapAnEmptyString
- implement testDoesNotWrapAShorterThanMaxCharsWord
- implement testItWrapsAWordSeveralTimesIfItsTooLong
- implement testItWrapsTwoWordsWhenSpaceAtTheEndOfLine
- implement testItWrapsTwoWordsWhenLineEndIsAfterFirstWord
- implement testItWraps3WordsOn2Lines
- implement testItWraps2WordsOn3Lines
- implement testItWraps2WordsAtBoundry
- create new class named Wrapper
git clone https://github.com/eduardofg87/lets-tdd-a-simple-app
cd lets-tdd-a-simple-app
composer install
keep track of the history of encoded words in a local storage.
Think about how to prevent invalid inputs from being passed to the algorithms.
to run the tests run the command: ./vendor/bin/phpunit ./tests/FirstTest