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

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

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>