Top "Phpunit" questions

PHPUnit is a programmer-oriented testing framework for PHP.

phpunit --debug still displays only dots

I want to see which test is currently executed during a phpunit run. I use the --debug param but still …

php symfony phpunit
How to unit test PHP traits

I want to know if there is a solution on how to unit-test a PHP trait. I know we can …

php unit-testing phpunit traits
Unit Testing with items that need to send headers

I'm currently working with PHPUnit to try and develop tests alongside what I'm writing, however, I'm currently working on writing …

php unit-testing phpunit
The xdebug extension is not loaded

I've got xdebug installed fine (showing up in phpinfo()) but I'm trying to get it to work with PHPUnit's code …

php phpunit xdebug loaded
Symfony functional test - custom headers not passing through

For some reason when i sent a new $client->request the headers I specify get lost: public function testGetClientsAction() { $…

symfony phpunit
Unit test for mocking a method called by new class object

I am writing unit test for an existing code which is like this class someClass { public function __construct() { ... } public function …

php mocking phpunit
phpunit - testing is painfully slow

I am diving deeper and deeper in the world of unit testing. One issue I encountered, and this is where …

php unit-testing phpunit
Mocking The Time used by all instances of DateTime for testing purposes

I'd like to be able to set the time for every instance of DateTime instantiated for the duration of a …

php testing datetime phpunit behat
How do I use PHPUnit with CodeIgniter?

I have read and read articles on PHPUnit, SimpleTest, and other Unit Testing frameworks. They all sound so great! I …

php unit-testing codeigniter phpunit
Mock in PHPUnit - multiple configuration of the same method with different arguments

Is it possible to configure PHPUnit mock in this way? $context = $this->getMockBuilder('Context') ->getMock(); $context->…

php mocking phpunit