Top "Phpunit" questions

PHPUnit is a programmer-oriented testing framework for PHP.

PHPUnit "Mocked method does not exist." when using $mock->expects($this->at(...))

I've run into a strange issue with PHPUnit mock objects. I have a method that should be called twice, so …

php unit-testing mocking phpunit
Creating a mock in phpunit without mocking any methods?

When I'm unit-testing my php code with PHPUnit, I'm trying to figure out the right way to mock an object …

mocking phpunit
In PHPUnit, how do I indicate different with() on successive calls to a mocked method?

I want to call my mocked method twice with different expected arguments. This doesn't work because expects($this->once()) …

php mocking phpunit
How can I remove completely PHPUnit using the PEAR Installer?

I installed PHPUnit using the PEAR installer a few days ago (I also installed Selenium RC for testing in PHP …

php windows selenium phpunit pear
phpunit memory_limit parameter does not apply

I've just installed phpunit via pear in a mac osx 10.7 and everything works fine except I got memory limit errors (…

php macos phpunit xdebug memory-limit
Class __PHP_Incomplete_Class has no unserializer

I am trying to run the tests in PHPUnit and getting this error. Fatal error: Uncaught exception 'ErrorException' with message …

php symfony phpunit lamp
phpunit mock - method does not exist

I recently updated PHPunit from 5.3 to 5.5 in an IntegrationTestCase of an app that is CakePhp 3.x based. and I don't …

php unit-testing cakephp phpunit cakephp-3.0
How to exclude files / code blocks from code coverage with Netbeans / PHPStorm / PHPUnit integration

Requirements: Netbeans with PHPUnit(6.9) EDIT: Same applies, for example, to PHPStorm How to: Exclude lines from code coverage. Exclude code …

netbeans phpunit code-coverage phpstorm
How to test Laravel 5 jobs?

I try to catch an event, when job is completed Test code: class MyTest extends TestCase { public function testJobsEvents () { Queue::…

php laravel phpunit laravel-queue
Exclude certain directories and files in pdepend, phpmd, phpcpd, phpcs, phpdoc, phploc

In my project there are certain directories and certain php files which are very large in size due to which …

phpunit jenkins phpdoc php-codebrowser