phpunit相关学习建议
ringa_lee
ringa_lee 2017-05-16 13:10:52
0
1
590

刚简单自学了下phpunit,简单测试自己写的代码,感觉已经了解了,想求写与phpunit相关的,比较深入的资料和方法。
比如:接口开发,过来的是json,原来框架的代码是把json处理了,放到了某些变量中,phpunit测试的是类,我好像无法模拟正确的参数传递。

再比如:商品详情接口,返货好多数据,总不能用 $this->assertEquals($expected,$actual);来验证接口是否ok吧。

求些学习方向,资料等等。

ringa_lee
ringa_lee

ringa_lee

reply all(1)
刘奇

phpunit can also simulate interface requests. It is enough to read the documentation. You can also refer to the test code of some frameworks, such as the test code in laravel, which integrates some codes for accessing interface requests. You can refer to

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!