Questions tagged [phpunit]

Framework and standard for PHP unit testing

PHPUnit is a framework for testing projects written in PHP.

Depending on how much code is involved with your question it can be either in scope for Super User or Stack Overflow.

13 questions
14
votes
3 answers

PHPUnit Windows command box nice colors

I have PHPunit installed on a Windows machine. But I don't get nice output on my command line. With the green colours. Someone on the PHPunit mailing list told me I need the ansi.sys driver. Can someone tell me how to do it so that PHPunit will use…
sanders
  • 189
8
votes
4 answers

Error trying to install PHPUnit from PEAR

$ sudo pear install phpunit/PHPUnit Unknown remote channel: pear.symfony-project.com phpunit/PHPUnit requires package "channel://pear.symfony-project.com/YAML" (version >= 1.0.2) phpunit/PHPUnit can optionally use PHP extension "xdebug" (version >=…
Andrew
  • 15,494
5
votes
0 answers

How to fix this PhpStorm, Docker and PhpUnit issue?

I have three docker containers: prefix-php-fpm prefix-mysql prefix-mysql-test I have configured Docker, remote PHP interpreter and PhpUnit in PhpStorm. But when i run tests which requires DB connection to the prefix-mysql-test container i receive…
3
votes
2 answers

Use remote PHPUnit coverage in PhpStorm

I am working in the following setup: There is a development VM running, where I can access the codebase and use it as project location in PhpStorm. Everything (nginx, database, phpunit, ...) is running on that VM. I have a network drive connected to…
3
votes
1 answer

How should be system configured for use breakpoints of xdebug for phpunit tests on netbeans (ubuntu)

How should be system configured for use breakpoints of xdebug for phpunit(3.5) tests on netbeans 6.9 (ubuntu 10.04). Example1 (breakpoint inside Test file): in ExampleTest.php I want to put breakpoint in line 30, when test will run he will stop in…
Ben
  • 1,377
  • 7
  • 22
  • 40
3
votes
3 answers

Can I run `phpunit` on an open PHP file inside vim?

Is there an easy way to run phpunit on open php test file inside vim?
DerKlops
  • 157
2
votes
0 answers

cannt run phpunit tests on bash ubuntu 11.10

I'm working with Ubuntu 11.10 as root on my local machine, I've installed xampp 1.7.7 and While following a tutorial on sitepoint on how to install pear to use PhpUnit, I didn't notice it then, but it seems that I installed or used an existing php…
2
votes
0 answers

"PHP Error" when running PHPUnit tests from within Komodo IDE

I am using the latest version of the Komodo IDE, PEAR and PHPUnit with PHP version 5.3.0. When I run the unit tests for my Komodo project the tests run correctly, but regardless of whether there are any tests to run or not I get shown the…
2
votes
0 answers

How to suppress "stty: standard input: Inappropriate ioctl for device" in Jenkins console

I use PHPUnit with Jenkins. PHPUnit outputs many "stty: standard input: Inappropriate ioctl for device." like this [***] $ /bin/sh -xe /tmp/jenkins3872195701082406677.sh  + vendor/bin/phpunit tests/ PHPUnit 5.7.22 by Sebastian Bergmann and…
1
vote
1 answer

Strange behaviour in installation of PHPUnit

I was trying to install PHPUnit following the step-by-step guide in the Getting Started page. However, when I try phpunit --version in terminal, I receive /usr/local/bin/phpunit: Permission denied. Trying sudo phpunit --version the error is sudo:…
James
  • 681
1
vote
1 answer

error phpunit executable not found

In an API project, we have composer.json set to the following: { "require-dev": { "phpunit/phpunit": "4.7.*" }, "require": { "monolog/monolog": "1.5.*" } } And, upon the first composer install everything was fine.…
Adam T
  • 151
1
vote
1 answer

phpunit causes Windows Explorer to lag on Windows 7

I am currently creating some automated testing suites for phpunit. This means I may run phpunit several times in a day. Sometimes, after I've run it, Windows Explorer just starts lagging. This expresses itself in several ways: the context menu…
1
vote
2 answers

Why showing pear and phpunit is not installed in xampp on ubuntu?

I have installed xampp 1.8 on my ubuntu 12.04. In /opt/lampp/lib/php/PEAR I can see there are two directory named PEAR and PHPUnit. But when I run pear -V or phpunit from terminal it gives the below messages: The program 'pear' is currently not…
Haque
  • 11