dface/phpunit-customization

My custom comparison extension for phpunit

dev-master 2023-09-22 08:59 UTC

This package is auto-updated.

Last update: 2024-12-22 11:42:12 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>