search

Home  >  Q&A  >  body text

Some logical methods in PHP are closely related to database operations. The actual results are reflected in the database. How to conduct automated unit testing.

Old drivers,

php中一些和数据库操作紧密相关的逻辑方法,
实际结果体现在数据库中,方法的返回值并不能体现内部的逻辑
如何对其进行自动化的单元测试phpunit。

A good programmer must be able to make good unit tests

淡淡烟草味淡淡烟草味2824 days ago483

reply all(1)I'll reply

  • 高洛峰

    高洛峰2017-05-24 11:33:04

    It is reflected in the database, then test whether the data in the database is correct. .
    phpunit also has database testing https://phpunit.de/manual/cur...

    reply
    0
  • Cancelreply