Lggr
Public Member Functions | Protected Attributes | List of all members
SebastianBergmann\Comparator\Comparator Class Reference
Inheritance diagram for SebastianBergmann\Comparator\Comparator:
Inheritance graph
[legend]

Public Member Functions

 setFactory (Factory $factory)
 
 accepts ($expected, $actual)
 
 assertEquals ($expected, $actual, $delta=0.0, $canonicalize=false, $ignoreCase=false)
 

Protected Attributes

 $factory
 
 $exporter
 

Detailed Description

Abstract base class for comparators which compare values for equality.

Member Function Documentation

◆ accepts()

SebastianBergmann\Comparator\Comparator::accepts (   $expected,
  $actual 
)
abstract

◆ assertEquals()

SebastianBergmann\Comparator\Comparator::assertEquals (   $expected,
  $actual,
  $delta = 0.0,
  $canonicalize = false,
  $ignoreCase = false 
)
abstract

Asserts that two values are equal.

Parameters
mixed$expectedFirst value to compare
mixed$actualSecond value to compare
float$deltaAllowed numerical distance between two values to consider them equal
bool$canonicalizeArrays are sorted before comparison when set to true
bool$ignoreCaseCase is ignored when set to true
Exceptions
ComparisonFailure

Reimplemented in SebastianBergmann\Comparator\DoubleComparator, SebastianBergmann\Comparator\ScalarComparator, SebastianBergmann\Comparator\NumericComparator, SebastianBergmann\Comparator\ResourceComparator, SebastianBergmann\Comparator\SplObjectStorageComparator, and SebastianBergmann\Comparator\TypeComparator.

◆ setFactory()

SebastianBergmann\Comparator\Comparator::setFactory ( Factory  $factory)
Parameters
Factory$factory

The documentation for this class was generated from the following file: