Codeception 2.2.9 发布了,Codeception 是一个全堆栈的 PHP 测试框架。
测试示例:[code]class UserControllerCest {
public $class = 'UserController';
public function createAction(CodeGuy $I)
{
$I->haveFakeClass($userController = Stub::make('UserController'));
$I->executeTestedMethodOn($userController, array('username' => 'MilesDavis', 'email' => 'miles@davis.com'))
->seeResultEquals(true)
->seeMethodInvoked($userController, 'renderHtml')
->seeInDabatase('users', array('username' => 'MilesDavis'));
}
}
?>[/code]更新内容:
[Laravel5] Laravel 5.4 support
[WebDriver] Added performOn to wait for element, and run actions inside it. See complete reference.
[WebDriver] Improved error messages for wait* methods
[REST] Binary responses support
seeBinaryResponseEquals assert that binary response matches a hash
seeBinaryResponseEquals assert that binary response doesn't match a hash
hide binary response on debug
[Laravel5] module fix error for applications that do not use a database.
[Laravel5] database seeders to be executed inside a transaction.
[Yii2] reverted #3834, closing transaction after each request.
Added crap4j report support. Use --coverage-crap4j option and codeception/c3 2.0.10
[PhpBrowser][Frameworks] If form has no id, use action attribute as identifier
Fixed test coloring output when a Feature title has some special chars in it like / or -
[REST] Added missing @part json and xml to deleteHeader
下载地址:https://github.com/Codeception/Codeception/archive/2.2.9.zip
来自:开源中国社区

