phpunit 安装
来源:互联网 发布:淘宝小女孩子长裙礼服 编辑:程序博客网 时间:2024/05/24 05:21
详细的安装步骤看官方文档,这里主要介绍遇到的问题。
为了生成分析报告:安装了 xdebug
wget http://phar.phpunit.de/phpunit.phar
chmod +x phpunit.phar
mv phpunit.phar /usr/local/bin/phpunit/
查看是否安装成功
/php5/bin/php phpunit.phar --version
这里操作时报错了。说没有 gmp.soa 文件。
我建了个软链接文件 gmp.soa => gmp.so
解决掉。
这里显示:
PHPUnit 4.6.4 by Sebastian Bergmann and contributors.
表示安装成功了。
下面写个测试示例:
====================
# cat DependencyFailureTest.php
====================
执行代码
/php5/bin/php phpunit.phar /tmp/DependencyFailureTest
PHPUnit 4.6.4 by Sebastian Bergmann and contributors.
I.
Time: 1.15 seconds, Memory: 22.75Mb
OK, but incomplete, skipped, or risky tests!
Tests: 2, Assertions: 0, Incomplete: 1.
#
注意执行时的文件路径不可以有下划线。
为了生成分析报告:安装了 xdebug
wget http://phar.phpunit.de/phpunit.phar
chmod +x phpunit.phar
mv phpunit.phar /usr/local/bin/phpunit/
查看是否安装成功
/php5/bin/php phpunit.phar --version
这里操作时报错了。说没有 gmp.soa 文件。
我建了个软链接文件 gmp.soa => gmp.so
解决掉。
这里显示:
PHPUnit 4.6.4 by Sebastian Bergmann and contributors.
表示安装成功了。
下面写个测试示例:
====================
# cat DependencyFailureTest.php
<?phpclass DependencyFailureTest extends PHPUnit_Framework_TestCase { public function testOne() { $this->markTestIncomplete("this is don't done test."); } public function testTwo() { }}
====================
执行代码
/php5/bin/php phpunit.phar /tmp/DependencyFailureTest
PHPUnit 4.6.4 by Sebastian Bergmann and contributors.
I.
Time: 1.15 seconds, Memory: 22.75Mb
OK, but incomplete, skipped, or risky tests!
Tests: 2, Assertions: 0, Incomplete: 1.
#
注意执行时的文件路径不可以有下划线。
0 0
- 安装PHPUnit
- PHPUnit安装
- PHPUnit 安装
- phpunit安装
- PHPUnit安装
- phpunit 安装
- phpunit 安装
- phpunit安装
- PHPUnit安装
- PHPUnit使用指南之安装PHPUnit
- centos linux安装PHPUnit 配置PHPUnit (深入浅出PHPUnit 1)
- PHPUnit袖珍指南-第四章 安装PHPUnit
- PHPUnit袖珍指南-第四章 安装PHPUnit
- 【phpunit】phpunit初次安装使用简记
- PHPunit 中phpunit selenium 扩展的安装
- Windows下PHPUnit安装
- 在windows安装PHPUnit
- Windows下PHPUnit安装
- from nova ironic to horizon(4)
- Samsung ATIV Book 9 review
- Ubuntu国内源,更新速度很快哟
- Jedis2.4.2链接池配置注释
- 根据两点经纬度计算距离
- phpunit 安装
- 利用Python进行机器学习和数据挖掘概述
- 3.6 内存分配与回收策略
- DirectX9 向量
- mysqli连接数据类实例
- AsyncTask和Handler的优缺点比较
- Android初学习 - ProgressBar控件的简单说明
- Jedis2.4.2链接池配置注释
- 黑马程序员_日记49_泛型定义在类上