Skip to content
  • Eloy Lafuente's avatar
    MDL-65204 phpunit: tweak constraint_object_is_equal_with_exceptions · 032c75ec
    Eloy Lafuente authored and jun's avatar jun committed
    In PHPUnit 7.x and above, IsEqual->value became private and, as far
    as our with exceptions class inherits from it, we cannot access to
    that anymore.
    
    So, in order to avoid that, we are overriding the constructor, capturing
    the original value for own use and forgetting.
    
    A more formal, alternative, solution would be to make our
    exceptional class to inherit from Constraint and make the
    class a pure dispatcher to different constraints, with IsEqual being
    just one of them.
    
    But we followed the easiest path here. Not ideal, but efective.
    032c75ec