dface / phpunit-customization
My custom comparison extension for phpunit
dev-master
2026-04-08 11:54 UTC
Requires
- php: ^7.4|^8.1
- ext-json: *
Requires (Dev)
- phpunit/phpunit: ^12.5
This package is auto-updated.
Last update: 2026-04-08 11:55:03 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>