dface / phpunit-customization
My custom comparison extension for phpunit
dev-master
2023-09-22 08:59 UTC
Requires
- php: ^7.4|^8.1
- ext-json: *
Requires (Dev)
- phpunit/phpunit: ^10.1
This package is auto-updated.
Last update: 2024-11-22 11:32:10 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>