1. 首页
  2. 数据库
  3. 其它
  4. phpunit snapshot assertions:一种无需编写实际测试用例即可进行测试的方法 源码

phpunit snapshot assertions:一种无需编写实际测试用例即可进行测试的方法 源码

上传者: 2021-02-19 09:26:33上传 ZIP文件 21.21KB 热度 6次
用PHPUnit进行快照测试 快照测试是一种无需编写实际测试用例即可进行测试的方法 use Spatie \ Snapshots \ MatchesSnapshots ; class OrderTest { use MatchesSnapshots ; public function test_it_casts_to_json () { $ order = new Order ( 1 ); $ this -> assertMatchesJsonSnapshot ( $ order -> toJson ()); } } 在第一次
下载地址
用户评论