Test Driven Development in PHP

前端 未结 8 2029
青春惊慌失措
青春惊慌失措 2021-01-29 23:47

I am a web-developer working in PHP. I have some limited experience with using Test Driven Development in C# desktop applications. In that case we used nUnit for the unit testin

8条回答
  •  忘掉有多难
    2021-01-30 00:07

    Test driven development is an approach where tests are always written before code. You should learn to PHPUNIT first in order to start TDD Development. Then while making your function you should always think how function can fail and write test case in phpunit and in the end you should write code in order to pass your test. Its will be a new approach so it will be little difficult in the beginning but once you get use to it, you will find it very useful specially for after development bugs and coding style. You can go through this Step By Step guide for understanding this concept.

    Always Remember if test are written after development they are useless. So TDD is must if you are thinking to write unit tesst

提交回复
热议问题