PHP Class kahlan\matcher\ToBeCloseTo

Datei anzeigen Open project: crysalead/kahlan Class Usage Examples

Public Properties

Property Type Description
$_description array Description reference of the last ::match() call.

Public Methods

Method Description
_buildDescription ( mixed $actual, mixed $expected, integer $precision ) Build the description of the runned ::match() call.
description ( ) Returns the description report.
match ( mixed $actual, mixed $expected, integer $precision = 2 ) : boolean Checks that $actual is close enough to $expected.

Method Details

_buildDescription() public static method

Build the description of the runned ::match() call.
public static _buildDescription ( mixed $actual, mixed $expected, integer $precision )
$actual mixed The actual value.
$expected mixed The expected value.
$precision integer The precision to use.

description() public static method

Returns the description report.
public static description ( )

match() public static method

Checks that $actual is close enough to $expected.
public static match ( mixed $actual, mixed $expected, integer $precision = 2 ) : boolean
$actual mixed The actual value.
$expected mixed The expected value.
$precision integer The precision to use.
return boolean

Property Details

$_description public_oe static_oe property

Description reference of the last ::match() call.
public static array $_description
return array