\MyCLabs\Enum\PHPUnitComparator

Use this Comparator to get nice output when using PHPUnit assertEquals() with Enums.

Add this to your PHPUnit bootstrap PHP file:

\SebastianBergmann\Comparator\Factory::getInstance()->register(new \MyCLabs\Enum\PHPUnit\Comparator());

Summary

Methods
Properties
Constants
accepts()
assertEquals()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
formatEnum()
No private properties found
N/A

Methods

accepts()

accepts(  $expected,   $actual) 

Parameters

$expected
$actual

assertEquals()

assertEquals(\MyCLabs\Enum\Enum  $expected, \MyCLabs\Enum\Enum|null  $actual,   $delta = 0.0,   $canonicalize = false,   $ignoreCase = false) : void

Parameters

\MyCLabs\Enum\Enum $expected
\MyCLabs\Enum\Enum|null $actual
$delta
$canonicalize
$ignoreCase

formatEnum()

formatEnum(\MyCLabs\Enum\Enum  $enum = null) 

Parameters

\MyCLabs\Enum\Enum $enum