Architect at Eastern Enterprise. • Working in Web Application development since 12+ years. • Twitter: @kapilsharmainfo • Facebook: /kapilsharmainfo • Linked in: kapilsharmainfo • Website: kapilsharma.info • Slides: speakerdeck.com/kapilsharma 2
software development process that relies on the repetition of a very short development cycle: requirements are turned into very specific test cases, then the software is improved to pass the new tests, only.” 4 What is TDD?
proven innocent. • First, solve the problem. Then, write the code. • Good programmers write code for humans first and computers next. • Don’t fix it if it is ain’t broke. • Quality is free, but only to those who are willing to pay heavily for it. 6
Star Wars movie. • Next 4 slides are taken from Michelangelo Van Dam’s (DragonBe) presentation ‘PHPUnit Episode iv.iii: Return of the tests’ • I really like that theme of PHP Unit presentations and wanted to share few slides. • Original presentation: https://www.slideshare.net/ DragonBe/phpunit-episode-iviii-return-of-the-tests 8
fails). • Once a test is made, it will always be tested. • Easy to refactor existing code (protection). • Easy to debug: Write a test to verify if bug is valid. • Higher confidence and less uncertainty. 15
of xUnit testing framework. • Created by Sebastian Bergmann. • User ‘assertions’ to verify behaviour of ‘unit of code’. • Open source and hosted on Github. • Can be installed using • PHAR • Composer 18
saw possibilities at high level. • Refer PHP Unit docs for much more details. • We will cover some of the practical uses in following session and workshop. 25