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

王练
 王练
发布于 2017年02月05日
收藏 11

Codeception 2.2.9 发布了,Codeception 是一个全堆栈的 PHP 测试框架。 

测试示例:

<?php
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'));
    }
}
?>

更新内容:

  • [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 

下载地址:

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处,尊重他人劳动共创开源社区。
转载请注明:文章转载自 OSCHINA 社区 [http://www.oschina.net]
本文标题:Codeception 2.2.9 发布,全堆栈 PHP 测试框架
加载中
返回顶部
顶部