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

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

问题描述

我一直在寻找一个教程,帮助我将PHPUnit与CakePHP集成。寻找使用Selenium测试太喜欢PHPUnit。



我一直尝试按照 http ://cakebaker.42dh.com/2006/03/22/selenium/ 但似乎没有得到它的工作。

解决方案

不幸的是CakePHP不是设计为与PHPUnit一起工作。 CakePHP已切换到使用 SimpleTest ,您将有两个选择之一,重构测试以使用SimpleTest或修改核心以使用PHPUnit。



但是,应该说明 Mark Story指出,CakePHP 2.0将使用PHPUnit 来测试框架,所以如果你可以等到那时候可能会成为最好的选择。



CakePHP 1.3测试书


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

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?

Thanks!

解决方案

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.

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 Book on Testing

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

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