【问题标题】:What is the best folder structure for unit and functional tests using Symfony 4?使用 Symfony 4 进行单元和功能测试的最佳文件夹结构是什么?
【发布时间】:2018-09-18 17:48:41
【问题描述】:

使用 Symfony 4 存储单元和功能测试的最佳文件夹结构是什么?

【问题讨论】:

标签: php unit-testing symfony symfony4


【解决方案1】:

根据官方 Symfony 页面https://symfony.com/download,他们提供了一个带有最佳实践的 Symfony Demo 应用程序。

说明: Symfony Demo 应用程序,最好的 Symfony 学习资源和遵循官方最佳实践开发应用程序的参考。

Symfony - 官方存储库: https://github.com/symfony/demo

如果您检查存储库,测试位于 /demo/tests/

/demo/tests/Controller/DefaultControllerTest.php

/demo/tests/Controller/BlogControllerTest.php

/demo/tests/Command/AddUserCommandTest.php

/demo/tests/Utils/ValidatorTest.php

【讨论】:

  • 有很差的例子,如果我想分离单元测试、功能测试和集成测试怎么办?
猜你喜欢
  • 1970-01-01
  • 2011-02-27
  • 1970-01-01
  • 2019-02-12
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多