Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Matt Glaman:
Test driven development in PhpStorm with auto-testing enabled
Oct 11, 2018 @ 17:39:16

Matt Glaman has a tutorial posted to his site sharing some of his experiences in using PhpStorm and its auto-testing feature when working with his codebase following a test-driven development approach.

When I work, I try to follow the principles of Test-Driven Development. I have found it to aid me in writing cleaner code, identifying odd coupling of components or crazy accidental dependencies between components. It also lets me write my API first by using mocks against interfaces I have defined.

[...] One of the key aspects of TDD to is to write your test and assert expectations, and then write code. That means you will be running your tests — a lot. That means having to manually run your tests for each code change (as you should) will kill your velocity. That’s where PhpStorm’s auto-test functionality comes in.

He includes a bit more detail about the feature including a screenshot) and a screencast video of it in action.

tagged: unittest tdd testdrivendevelopment phpstorm tutorial autotest

Link: https://glamanate.com/blog/test-driven-development-phpstorm-auto-testing-enabled


Trending Topics: