Codeception 是一个全堆栈的 PHP 测试框架。 Inspired by BDD, it provides an original way for writing acceptance, Functional, and uNit tests. It's easy to write, easy to understand, and easy to run in a browser or its emulaTor.

测试示例:


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'));
    }
}
?>
Codeception 2.2.9 发布,全堆栈 PHP 测试框架
Codeception 2.2.9 发布了,Codeception 是一个全堆栈的 PHP 测试框架。 测试示例: 发布于 2017-02-04 22:00:23 | 110 次阅读


Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务