红联Linux门户
Linux帮助

Codeception 2.2.9发布,全堆栈PHP测试框架

发布时间:2017-02-05 09:17:59来源:红联作者:baihuo
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

来自:开源中国社区
文章评论

共有 0 条评论