Quantcast
Channel: OSCHINA 社区最新新闻
Viewing all articles
Browse latest Browse all 54524

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

$
0
0

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 

下载地址:


Viewing all articles
Browse latest Browse all 54524

Trending Articles