dface / phpunit-customization
My custom comparison extension for phpunit
Installs: 77
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/dface/phpunit-customization
Requires
- php: ^7.4|^8.1
- ext-json: *
Requires (Dev)
- phpunit/phpunit: ^10.1
This package is auto-updated.
Last update: 2025-09-22 13:13:37 UTC
README
My custom comparison extension for phpunit
.
I prefer to compare objects with equals
method.
phpunit
provides assertObjectEquals
method, but it's unsuitable to me because I want to compare arrays of objects too.
Also I prefer strict scalar comparison.
To use it add the following to phpunit.xml
<extensions>
<extension class="dface\PhpunitCustomization\ComparatorExtension"/>
</extensions>