Top "Phpunit" questions

PHPUnit is a programmer-oriented testing framework for PHP.

How do I assert the result is an integer in PHPUnit?

I would like to be able test that a result is an integer (1,2,3...) where the function could return any number, …

php unit-testing phpunit
Passing parameters to PHPUnit

I'm starting to write PHPUnit tests and I'd like the tests to be run from developers machines as well as …

php phpunit
SimpleTest vs PHPunit

I was wondering if anyone that has experience in both this stuff can shed some light on the significant difference …

php unit-testing phpunit simpletest
Can I mock an interface implementation with PHPUnit?

I've got an interface I'd like to mock. I know I can mock an implementation of that interface, but is …

php interface mocking phpunit
PEAR package install fails

i try to install packages from pear.phpqatools.org/phpqatools First of all command pear config-get php_dir returns D:\…

php console phpunit package pear
phpunit -coverage-html report path

I have tried to execute phpunit with xdebug for code coverage as below, C:\wamp\bin\php\php5.3.22>phpunit …

unit-testing phpunit xdebug xdebug-profiler
How to tell phpunit to stop on failure

I'm running a large suite of phpunit tests, and I'd like see which test failed as soon as it failed, …

php unit-testing phpunit
how to unit test curl call in php

How would you go about unit testing a curl implementation? public function get() { $ch = curl_init($this->request->…

php curl phpunit
PHPUnit, mocked interfaces, and instanceof

Sometimes in my code, I'll check to see if a particular object implements an interface: if ($instance instanceof Interface) {}; However, …

php unit-testing mocking phpunit
PHPUnit: Doing assertions on non-public variables

Suppose I have a class with a private property and associated public getter and setter. I want to test with …

php unit-testing phpunit white-box