全栈测试 PHP 框架
** 现代PHP 每个人的测试**
代码(Codeception)是PHP的现代全存储测试框架. 在BDD的启发下,它提供了一种绝对新的书写接受,功能甚至是单位测试的方法.
捐款
在《法典》中,我们很高兴收到社区的捐款。 如果要发送代码或文档的添加或修正,请检查归属指南.
{\fn黑体\fs22\bord1\shad0\3aHBE\4aH00\fscx67\fscy66\2cHFFFFFF\3cH808080}在一张照片里
描述你测试了什么,如何测试。 使用 PHP 快速写入描述 。
进行测试,看看采取了什么行动,看到了什么结果。
样本测试
(原始内容存档于2019-09-29) (英语). ``` php $I->amOnPage('/'); $I->click('Pages'); $I->click('New'); $I->see('New Page'); $I->submitForm('form#new_page', ['title' => 'Movie Review']); $I->see('page created'); // notice generated $I->see('Movie Review','h1'); // head of page of is our title $I->seeInCurrentUrl('pages/movie-review'); // slug is generated $I->seeInDatabase('pages', ['title' => 'Movie Review']); // data is stored in database
对于单元测试,您可以继续使用传统的 PHPUnit 测试,因为 Codeception 也可以运行这些测试。
文档源文件可以在 https://github.com/Codeception/co 中找到
[View Documentation](https://codeception.com/docs/Introduction)暂无开放 Issues,或尚未同步最近议题。