Top "Phpunit" questions

PHPUnit is a programmer-oriented testing framework for PHP.

PHPUnit Mock an object's properties

I'm looking for a way to mock an object and populate its properties. Here's an example of a method who …

php unit-testing mocking phpunit mockery
"Web interface" to PHPUnit tests?

Is there a simple "Web interface" to running PHPUnit test suites? i.e. a PHP script that runs the test …

php unit-testing tdd phpunit
How do I correctly install PHPUnit with PEAR?

I have had to de- and reinstall a newer version of PHPUnit following these directions. Now when I'm launching this …

php symfony1 phpunit yaml pear
Why does phpunit not show any errors in the console

I'm using phpunit with Laravel 4 framework. Why is it that when there's a PHP error during the tests, no error …

php tdd phpunit laravel laravel-4
PHP Fatal error: Class 'PHPUnit\Framework\TestCase' not found with PHPUnit 6 and PHP 7.0

I am playing with php 7 and phpunit 6. Here is the test I wrote: <?php declare(strict_types=1); namespace Test; …

php unit-testing phpunit php-7
Symfony2 functional testing InvalidArgumentException: The current node list is empty

I get "InvalidArgumentException: The current node list is empty." running functional tests through PHPUnit. Here is test i wrote: public …

symfony phpunit functional-testing
Equivalent of SimpleTest "partial mocks" in PHPUnit?

I'm trying to migrate a bunch of tests from SimpleTest to PHPUnit and I was wondering if there is an …

php phpunit simpletest
How to test authentication via API with Laravel Passport?

I'm trying to test the authentication with Laravel's Passport and there's no way... always received a 401 of that client is …

laravel testing laravel-5 phpunit laravel-passport
PHPUnit Segmentation fault

When a PHPUnit test fails normally on my dev box (Linux Mint), it causes a "Segmentation Fault" on my Continous …

php segmentation-fault phpunit
PHPUnit tests real example

I've created a mail wrapper class. I know that there are lots of libraries to send e-mails but i want …

php email tdd phpunit wrapper