将PHPUnit与CakePHP 1.3集成

编程入门 行业动态 更新时间:2024-10-26 08:20:42
本文介绍了将PHPUnit与CakePHP 1.3集成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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

我一直尝试按照 http ://cakebaker.42dh/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 cakebaker.42dh/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集成

本文发布于:2023-11-01 12:12:57,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1549299.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:PHPUnit   CakePHP

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!