Codeception 正在参加 2021 年度 OSC 中国开源项目评选,请投票支持!
Codeception 在 2021 年度 OSC 中国开源项目评选 中已获得 {{ projectVoteCount }} 票,请投票支持!
2021 年度 OSC 中国开源项目评选 正在火热进行中,快来投票支持你喜欢的开源项目!
2021 年度 OSC 中国开源项目评选 >>> 中场回顾
Codeception 获得 2021 年度 OSC 中国开源项目评选「最佳人气项目」 !
授权协议 MIT
开发语言 PHP
操作系统 跨平台
软件类型 开源软件
开源组织
地区 不详
投 递 者 红薯
适用人群 未知
收录时间 2012-05-10

软件简介

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.

测试示例:

<?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'));
    }
}
?>
展开阅读全文

代码

评论

点击引领话题📣 发布并加入讨论🔥
发表于开发技能专区
2018/03/01 07:30

Codeception 2.4.0 发布,兼容 PHPUnit 7.x

Codeception 2.4.0 已发布,更新内容如下: 兼容 PHPUnit 7.x 不再支持 PHP 5.4 和 PHP 5.5 内部 API 重构: 内部使用的现代 PHP 类名称 将 PHPUnit 相关的类移到了 codeception / phpunit-wrapper 包中。 Cest hooks 行为调整: 当测试失败时调用 _failed 当测试成功时调用 _passed 测试成功或失败均调用 _after 更多详情可查阅更新日志。 Codeception 是一个全堆栈的 PHP 测试框架,测试示例: <?php class UserControllerC...

1
4
发表了资讯
2017/02/05 05:26

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

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' => '...

0
10
没有更多内容
加载失败,请刷新页面
点击加载更多
加载中
下一页
发表了博客
{{o.pubDate | formatDate}}

{{formatAllHtml(o.title)}}

{{parseInt(o.replyCount) | bigNumberTransform}}
{{parseInt(o.viewCount) | bigNumberTransform}}
没有更多内容
暂无内容
发表了问答
{{o.pubDate | formatDate}}

{{formatAllHtml(o.title)}}

{{parseInt(o.replyCount) | bigNumberTransform}}
{{parseInt(o.viewCount) | bigNumberTransform}}
没有更多内容
暂无内容
暂无内容
0 评论
13 收藏
分享
OSCHINA
登录后可查看更多优质内容
返回顶部
顶部