替代现在废弃的dbunit扩展名?

问题描述 投票:5回答:1

所以我可以使用PHPUnit测试使用数据库的代码,我刚刚使用Composer安装了DbUnit extension,并且收到以下消息:

Package phpunit / dbunit已被放弃,应避免使用它。没有建议更换。

我见过the issue on the extension being abandoned,人们谈论着滚动自己的数据库测试代码,但是他们没有涉及更多细节。有没有推荐的方法可以使用PHPUnit测试数据库代码,或者有人知道任何示例吗?

((我确实打开了an issue并问PHPUnit的作者,但是他的回答很迅速,而且很直截了当-“不,没有。”:-/

unit-testing phpunit dbunit
1个回答
0
投票
我在我们的项目中使用了这个叉子:https://github.com/kornrunner/dbunit

无缝工作。

您也可以尝试这个似乎也很活跃的方法:https://github.com/misantron/dbunit

© www.soinside.com 2019 - 2024. All rights reserved.