6.7. 整理测试目录
为了更好的组织测试,我们将已有的测试文件调整下位置:
- 在 tests/Feature 下新建 Answers 和 Questions 文件夹;
- 将 PostAnswersTest.php 和 BestAnswerTest.php 移到 Answers 里;
- 将 ViewQuestionsTest.php 移到 Questions 里;
- 调整文件位置后,请相应修改以上文件的命名空间;
- 然后我们要运行一下测试
phpunit
,确保功能没有被破坏。
以上代码改动较大,我们来提交一次代码:
$ git add .
$ git commit -m 'change test folders'