`
singleboss
  • 浏览: 2840 次
  • 性别: Icon_minigender_1
  • 来自: 淄博
最近访客 更多访客>>
社区版块
存档分类
最新评论

Windows 下安装 phpunit

 
阅读更多
pear 方式安装:
      这种安装方式依靠于PEAR,pear是由php的安装包提供的,并且需要的php版本必须是php 4.3.0以后。
使用这种方式安装phpunit,就得先在本地的Pear环境中注册phpunit依赖的pear (引导)通道,phpunit 主要依赖一下几个通道:
pear channel-discover pear.phpunit.de
pear channel-discover components.ez.no
pear channel-discover pear.symfony-project.com
注册完成以上的通道后就可以用一下的命令安装phpunit到你的php环境中了:)
        pear install phpunit/PHPUnit
如果遇到不能安装的情况,可以尝试更新pear的版本等,使用的命令是:pear upgrade-all
手工安装:

Although using the PEAR Installer is the only supported way to install PHPUnit, you can install PHPUnit manually. For manual installation, do the following:
1.Download a release archive from http://pear.phpunit.de/get/ and extract it to a directory that is listed in the              include_path of your php.ini configuration file.


2.Prepare the phpunit script:
  a)、Rename the phpunit.php script to phpunit.
  b)、Replace the @php_bin@ string in it with the path to your PHP command-line interpreter (usually    /usr/bin/php).
  c)、Copy it to a directory that is in your path and make it executable (chmod +x phpunit).
3.Prepare the PHPUnit/Util/PHP.php script:
  a)、Replace the @php_bin@ string in it with the path to your PHP command-line interpreter (usually    /usr/bin/php).
分享到:
评论

相关推荐

    phpunit windows

    在Windows环境下安装PHPUnit,通常可以通过Composer,PHP的依赖管理工具来完成。首先,确保你已经安装了PHP和Composer。然后,在命令行中运行以下命令以全局安装PHPUnit: ``` composer global require phpunit/...

    phpunit安装方法

    #### 三、Windows下的PHPUnit安装 在Windows系统中安装PHPUnit相对复杂一些,但仍然可以遵循一定的步骤完成。 1. **下载并配置PHP**: - 下载适合Windows系统的PHP压缩包(如`php-5.2.17-Win32.zip`)。 - 解压...

    Windows下安装PHP单元测试环境PHPUnit图文教程

    在Windows操作系统下安装PHP单元测试环境PHPUnit的图文教程主要涉及了以下几个重要知识点: 1. 下载PHP安装包并配置环境: - 下载PHP的压缩包,解压到一个固定的文件夹(示例路径为E:\php)。 - 配置php.ini文件...

    pear及phpUnit的安装教程

    `WAMP下安装PEAR和PHPUnit - ruby97的专栏 - 博客频道 - CSDN.NET_files`可能是一些相关的图片或辅助资源。 安装完成后,了解如何使用PEAR和phpUnit也很关键。PEAR主要用于引入和管理类库,而phpUnit则用于编写和...

    windows下安装pear及phpunit(注意配置好php命令行环境)

    在Windows环境下安装PHP的包管理工具PEAR以及PHP的单元测试框架PHPUnit是一个重要的过程,尤其是在需要进行PHP开发和测试时。本文将详细说明安装过程,包括配置PHP命令行环境、安装PEAR以及如何正确安装PHPUnit。 #...

    安装pear和phpunit

    ### 安装PEAR和PHPUnit知识点详解 #### 一、安装PEAR前的准备工作 在开始安装PEAR之前,确保已经正确配置了`php.ini`文件。对于不同的操作系统,`include_path`的设置有所不同: - **Unix系统**: ```ini ...

    Windows下wamp php单元测试工具PHPUnit安装及生成日志文件配置方法

    本文实例讲述了Windows下wamp php单元测试工具PHPUnit安装及生成日志文件配置方法。分享给大家供大家参考,具体如下: phpunit下载网站 http://www.phpunit.cn/ 一、安装PHPUnit 1.选择版本 我用的是php版本是5.6.25...

    phpunit-book.pdf

    首先,手册介绍了PHPUnit的安装,包括系统需求、通过PHP档案包(PHAR)安装、在Windows平台下的安装、校验PHPUnit PHAR发行包以及通过Composer安装。PHPUnit 6.1版本是文档关注的焦点,同时提及了一些可选的组件包。 ...

    PHPUnit安装及使用示例

    安装PHPUnit: 在php的目录下: 复制代码 代码如下: pear channel-discover pear; pear install phpunit/PHPUnit windows下将php的环境变量加入到PATH环境变量中。 简单使用: 复制代码 代码如下: <?php class ...

    shopex之phpunit测试环境

    安装完成后,你需要确保`~/.composer/vendor/bin`(在Unix-like系统中)或`%USERPROFILE%\AppData\Roaming\Composer\vendor\bin`(在Windows系统中)已经被添加到你的PATH环境变量中,这样你就可以在任何目录下运行`...

    phpunit 中文手册

    在安装PHPUnit时,需要考虑一系列需求,比如PHP版本,然后可以选择通过PHP档案包(PHAR)方式或者在Windows上进行安装,也可以通过Composer来安装PHPUnit。安装后,可以通过命令行使用PHPUnit,包括各种命令行选项来...

    phpunit4.8.35

    `phpunit.cmd`是Windows操作系统的批处理文件,它为命令行用户提供了一个简单的接口来启动`phpunit.phar`。用户只需在命令行中运行`phpunit.cmd`,就能执行 PHPUnit 测试。 在4.8.35这个版本中,主要知识点包括: ...

    phpunit手册

    2. **Windows系统安装** - **命令提示符**:使用`php phpunit.phar --version`来验证安装是否成功。 3. **Composer** - **依赖管理**:使用Composer安装PHPUnit作为项目依赖。 - **命令**:`composer require -...

    Windows Composer安装 及Yii2的Composer安装

    在本文中,我们将详细介绍如何在 Windows 操作系统上安装 Composer,以及如何使用 Composer 安装 Yii2 框架。 一、Composer 安装 在 Windows 操作系统上安装 Composer 有两种方式:通过下载安装文件和通过 CMD ...

    Windows安装Pear所需文件

    总的来说,`go-pear.php`和`go-pear.phar`是Windows环境下安装PEAR不可或缺的部分。它们简化了PHP开发者的工具链管理,使得安装和维护PHP库变得更加简单和高效。确保正确安装并熟悉使用这两个文件,将极大地提升你在...

Global site tag (gtag.js) - Google Analytics