There are currently two libraries that offer property based testing functionality in PHP:
Eris which is a PHP port based on
Haskell's QuickCheck
PhpQuickCheck which is a PHP port based on clojure.test.check.
Eris has been build to work well with the PHPUnit ecosystem out-of-the-box.
PhpQuickCheck has been built to work standalone but can also be used in combination with PhpUnit and it's @dataprovider functionality. There is an example of this in the repository.
You can have a go with the Faker library: https://github.com/fzaninotto/Faker. It won't do the testing for you, but it's great for generating the random data.
发布评论
评论(2)
目前有两个库在 PHP 中提供基于属性的测试功能:
Haskell 的 QuickCheck
Eris 旨在与开箱即用的 PHPUnit 生态系统良好配合。
PhpQuickCheck 被构建为独立工作,但也可以与 PhpUnit 及其
@dataprovider
功能。 存储库中有一个示例 。There are currently two libraries that offer property based testing functionality in PHP:
Haskell's QuickCheck
Eris has been build to work well with the PHPUnit ecosystem out-of-the-box.
PhpQuickCheck has been built to work standalone but can also be used in combination with PhpUnit and it's
@dataprovider
functionality. There is an example of this in the repository.您可以尝试一下 Faker 库:https://github.com/fzaninotto/Faker。它不会为您进行测试,但它对于生成随机数据非常有用。
You can have a go with the Faker library: https://github.com/fzaninotto/Faker. It won't do the testing for you, but it's great for generating the random data.