yii 和 zend studio 集成

发布时间:2020-05-18 11:36:48 作者:kingzeus
来源:网络 阅读:1715

yii是基于测试驱动的,而zend studio是一个好用的ide。集成就是必须的。

本文适合喜欢使用ide的开发者,vim用户或者文本编辑器使用者请忽略。

本文使用的是最新的zend studio (版本 10.0.0)官网下载

yii本身没啥可说的,主要还是phpunit相关的内容。

[php]
require_once 'test\CTestCase.php';

/**
* Task test case.
*/
class TaskTest extends CTestCase {

public function testNewArrayIsEmpty()
{
$fixture = array();
$this->assertEquals(0, sizeof($fixture));
}
}
[/php]

可以运行,报错:No test executed, Either a fatal error occurred, the launch was stopped manually or the script execution was halted with a ‘die’/'exit’ statement.
查看输出:require_once(): Failed opening required 'PHPUnit/Extensions/SeleniumTestCase.php' (include_path='.;C:\Program Files (x86)\Zend\Zend Studio 10.0.0\plugins\com.zend.php.phpunit_10.0.0.201210220951\resources\library\3.6.10\;...........
原因:phpunit默认并没有Selenium的扩展
解决办法:

  1. 使用自己的pear安装的phpunit

  2. 下载一个Selenium的扩展,即可.(下载地址)解压到phpunit目录(就是上面输出里面的地址)的Extensions


推荐阅读:
  1. 安卓软件能被Yii 框架开发吗
  2. yii2.0和laravel区别是什么

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

php yii zend studio

上一篇:JavaScript实现输入对话框的代码

下一篇:redis怎么实现条件查询?

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》