Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
Unit Testing With PHPUnit https://phpunit.de/
Slide 2
Slide 2 text
Test, that the code you wrote, actually works. Concept
Slide 3
Slide 3 text
Why? ● Code Quality ● Changes Does Not Break Anything ● Easy Contribution ● Speed Up Development ● Continuous Integration ● Sleep At Night
Slide 4
Slide 4 text
Testing In Browser
Slide 5
Slide 5 text
Installation Old Way New (Modern) Way https://phpunit.de/manual/current/en/installation.html
Slide 6
Slide 6 text
Configuration - phpunit.xml(.dist) https://phpunit.de/manual/current/en/appendixes.configuration.html
Slide 7
Slide 7 text
File Structure |--src/ |----Example.php |--tests/ |----ExampleTest.php |--phpunit.xml
Slide 8
Slide 8 text
Example Test Case
Slide 9
Slide 9 text
https://phpunit.de/manual/current/en/appendixes.assertions.html Assertions
Slide 10
Slide 10 text
https://phpunit.de/manual/current/en/appendixes.annotations.html @Annotations
Slide 11
Slide 11 text
Test CLI
Slide 12
Slide 12 text
PHPUnit with PHPStorm
Slide 13
Slide 13 text
https://github.com/Landish/Pagination Showcase
Slide 14
Slide 14 text