将 PHPUnit 与 CakePHP 1.3 集成 [英] Integrating PHPUnit with CakePHP 1.3

查看:34
本文介绍了将 PHPUnit 与 CakePHP 1.3 集成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在寻找帮助我将 PHPUnit 与 CakePHP 集成的教程.也希望使用 Selenium 测试,因此更喜欢 PHPUnit.

I have been looking for a tutorial to help me integrate PHPUnit with CakePHP. Looking to use Selenium tests too so prefer PHPUnit.

我一直在尝试遵循 http://cakebaker.42dh 上的教程.com/2006/03/22/selenium/ 但似乎无法让它工作.有什么好的教程吗?

I have been trying to follow the tutorial on http://cakebaker.42dh.com/2006/03/22/selenium/ but cant seem to get it work. Any good tutorials out there?

谢谢!

推荐答案

不幸的是,CakePHP 不能与 PHPUnit 一起工作.CakePHP 已转为使用 SimpleTest,您将有以下两种选择之一,重构您的测试以使用 SimpleTest 或修改核心使用PHPUnit.

Unfortunately CakePHP isn't designed to work together with PHPUnit. CakePHP has switched to using SimpleTest and you'll have one of two choices, refactor your tests to work with SimpleTest or modify the core to use PHPUnit.

但是应该说明的是,Mark Story 已经声明 CakePHP 2.0 将使用 PHPUnit 因为它是测试框架,所以如果你能等到那时,那可能是最好的选择.

However it should be stated that Mark Story has stated that CakePHP 2.0 will use PHPUnit for it's testing framework, so if you can aford to wait till then that may wind up being the best option.

CakePHP 1.3 测试书籍

这篇关于将 PHPUnit 与 CakePHP 1.3 集成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆