search
HomeBackend DevelopmentPHP TutorialNew to PHP----Install Pear and PHPUnit in WAMP integrated environment--Success!

Install phpunit in wamp environment
I searched a lot of information before, and it turns out that the installation method written in my previous article by a senior in my blog has expired. I still followed that method. As a result, when installing, I kept getting errors. The command was executed N+ times. , after confirming that it was not due to the network, I turned to the documentation on their official website, address: https://phpunit.de/manual/5.0/en/installation.html. As stated before, the environment is: win8 64bit + php5. 3.10 + Apache2.2.21
php新手----WAMP集成环境下安装Pear和PHPUnit --成功!Find the Windows installation method


php新手----WAMP集成环境下安装Pear和PHPUnit --成功!php installation directory, configure the environment variables, steps 1 and 2 in the picture can actually be simplified to one step


  1. php新手----WAMP集成环境下安装Pear和PHPUnit --成功!Replace https:/ Download the /phar.phpunit.de/phpunit.phar file to the php installation directory. For example, mine is: E:phptoolswampServerwampbinphpphp5.3.10

  2. Windows+R Call up the cmd command line tool

  3. Create a phpunit script

    First switch to your php installation directory
  4. Enter the command: echo @php “%~dp0phpunit.phar” %* > phpunit.cmd
  5. After the command is executed, the phpunit.cmd script




    exit command will be generated in the php installation directory to exit cmd
    Then reopen a command line window and use the command: phpunit –version to check whether the installation is successful! php新手----WAMP集成环境下安装Pear和PHPUnit --成功!


After struggling for so long, it is better to look at the latest official version~~~ I changed a few static pages in one afternoon, and all the time was wasted here. I hope everyone can refer to it to improve efficiency!

php新手----WAMP集成环境下安装Pear和PHPUnit --成功!').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i

').text(i)); }; $numbering.fadeIn(1700); }); });

The above introduces the PHP novice-installing Pear and PHPUnit in the WAMP integrated environment-success! , including relevant content, I hope it will be helpful to friends who are interested in PHP tutorials.
Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
PHP开发中如何使用PHPUnit进行Mock测试PHP开发中如何使用PHPUnit进行Mock测试Jun 27, 2023 am 10:25 AM

在PHP开发中,测试是非常重要的一个环节,测试可以大大减少错误的发生,提高代码质量。Mock测试是测试中的一种形式,它可以模拟出虚假的对象或数据,以便测试我们代码的某个特定功能或场景。PHPUnit是PHP中非常流行的一个测试框架,它支持Mock测试。在这篇文章中,我们将探讨如何使用PHPUnit进行Mock测试。一、什么是Mock测试在开始之前,我们先来了

PHP中的测试报告工具PHP中的测试报告工具May 24, 2023 am 08:24 AM

PHP是一种常见的开源编程语言,广泛应用于Web开发中,它的优点就在于易学、易用、可拓展性强等优点。而作为开发者,我们为了在保证代码质量的同时提高开发效率,必不可少的就是测试和测试报告的使用。在PHP开发中,有很多测试和测试报告工具,其中最常见的就是PHPUnit。然而,PHPUnit虽然简单易用,但是需要一些编写测试用例的基础知识,如果不熟悉,使用起来还是

php怎么设置implode没有分隔符php怎么设置implode没有分隔符Apr 18, 2022 pm 05:39 PM

在PHP中,可以利用implode()函数的第一个参数来设置没有分隔符,该函数的第一个参数用于规定数组元素之间放置的内容,默认是空字符串,也可将第一个参数设置为空,语法为“implode(数组)”或者“implode("",数组)”。

如何使用PHP和PHPUnit检查代码规范和质量如何使用PHP和PHPUnit检查代码规范和质量Jun 25, 2023 pm 04:57 PM

在现代的软件开发中,代码质量和规范是极为重要的因素。不仅可以让代码更加整洁易于维护,还可以提高代码的可读性和可扩展性。但是,如何检查代码的质量和规范呢?本文将介绍如何使用PHP和PHPUnit来实现这一目标。第一步:检查代码规范在PHP开发中,有一种非常流行的代码规范,它被称为PSR(PHP标准规范)。PSR规范的目的是使PHP代码更具可读性和可维护性。其中

PHP中的代码检查工具PHP中的代码检查工具May 24, 2023 pm 12:01 PM

检查代码质量是每个程序员都必须要做的任务,而PHP中也有很多工具可以用于检查代码的质量和风格,从而提高代码的可读性和可维护性,提高代码的可靠性和安全性。本文将介绍几种常见的PHP代码检查工具,并对它们进行简单的比较和评估,希望可以帮助读者在开发过程中选择合适的工具,提高代码质量和效率。PHP_CodeSnifferPHP_CodeSniffer是一个广泛应用

PHP编程中有哪些常见的代码质量工具?PHP编程中有哪些常见的代码质量工具?Jun 12, 2023 am 08:16 AM

PHP编程中有哪些常见的代码质量工具?在现代的软件开发中,代码质量是非常重要的。如果代码质量不好,不仅会降低代码的可读性,增加维护难度,还会造成安全漏洞等一系列问题。而在PHP编程中,我们可以使用一些代码质量工具来检查代码的质量。本文将介绍一些常见的PHP代码质量工具。PHP_CodeSnifferPHP_CodeSniffer是一个用于静态分析PHP代码的

php如何使用PHPUnit和Mockery进行单元测试?php如何使用PHPUnit和Mockery进行单元测试?May 31, 2023 pm 04:10 PM

在PHP项目开发中,单元测试是一项很重要的任务。PHPUnit和Mockery是两个相当流行的PHP单元测试框架,其中PHPUnit是一个被广泛使用的单元测试工具,而Mockery则是一个专注于提供统一而简洁的API以创建和管理对象Mock的对象模拟工具。通过使用PHPUnit和Mockery,开发人员可以快速高效地进行单元测试,以确保代码库的正确性和稳定性

如何使用PHPUnit进行PHP单元测试如何使用PHPUnit进行PHP单元测试May 12, 2023 am 08:13 AM

随着软件开发行业的发展,测试逐渐成为了不可或缺的一部分。而单元测试作为软件测试中最基础的一环,不仅能够提高代码质量,还能够加快开发者开发和维护代码的速度。在PHP领域,PHPUnit是一个非常流行的单元测试框架,它提供了各种功能来帮助我们编写高质量的测试用例。在本文中,我们将介绍如何使用PHPUnit进行PHP单元测试。安装PHPUnit在使用PHPUnit

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)