MDL-47449 phpunit: Add comparitor for isEqual with exceptions
commit504c97925cf928f38c47ef6ce02b3c9ce8d5a53e
authorAndrew Nicols <andrew@nicols.co.uk>
Fri, 6 Mar 2015 02:32:26 +0000 (6 10:32 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Fri, 14 Aug 2015 02:53:19 +0000 (14 10:53 +0800)
treeda247e1597354a90808dc2bdd28a6ad3da55ca6f
parentdda862abb57f656633f0736b858f7f048efd44bb
MDL-47449 phpunit: Add comparitor for isEqual with exceptions

We often do isEqual tests but where a field, may have a single exception.
Ordinarily we can handle this easily by breaking the test down, but when
dealing with mocked objects we can only pass an instance of a
PHPUnit_Framework_Constraint, or a single value (which is cast to an
instance of PHPUnit_Framework_Constraint_IsEqual).

To deal with instances of time-based exception, we need to be able to
compare simple objects and classes where one or two values may be
different.
lib/phpunit/classes/constraint_object_is_equal_with_exceptions.php [new file with mode: 0644]
lib/phpunit/lib.php