phpunit
phpunit copied to clipboard
The PHP Unit Testing framework.
In some case, it can be useful to mock a callable. So far, no method exists to provide it, but the following workaround is possible : ```php $mock = $this->createPartialMock(\stdClass::class,...
Exporter implementation is right now hardcoded in Constraints and Comparators. This works fine in most cases but it becomes unusable in the case of large objects such as Doctrine entities....
| Q | A | --------------------| --------------- | PHPUnit version | 7.x | PHP version | 7.1 | Installation Method | Composer When comparing values that happen to not be...
## History and Background ### The `TestListener` Interface [First](http://svn.php.net/viewvc/pear/packages/PHPUnit/tags/RELEASE_0_3/PHPUnit_TestListener.php?revision=88454&view=markup&pathrev=319096), there was the `PHPUnit\Framework\TestListener` interface: ```php interface TestListener { public function addError(Test $test, Throwable $t, float $time): void; public function addWarning(Test...
If [support for true as a stand-alone type](https://github.com/php/php-src/pull/8326) is added to PHP 8.2 then PHPUnit's test double code generator has to support this.
| Q | A | --------------------| --------------- | PHPUnit version | 8.5.5 | PHP version | 7.3.17 | Installation Method | Composer Reported to pcov, answer was "_This is an...
| Q | A | --------------------| --------------- | PHPUnit version | 9.5.4 | PHP version | 7.4.19 | Installation Method | Composer / PHAR #### Summary There is no ``...
| Q | A | --------------------| --------------- | PHPUnit version | 8.5.0 | PHP version | 7.2.24 | Installation Method | Composer This issue is related to the `MockBuilder::setMethods()` method...
From my learnings of unit testing, the importance is placed on testing the unit of functionality, not individual classes. With that in mind, I declare an interface and create a...