PHP Class kahlan\matcher\ToEcho

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 ( string $actual, string $expected ) Build the description of the runned ::match() call.
actual ( Closure $actual ) : string Returns the output generated by the closure.
description ( ) Returns the description report.
match ( Closure $actual, mixed $expected = null ) : boolean Checks that $actual echo the $expected string.

Method Details

_buildDescription() public static method

Build the description of the runned ::match() call.
public static _buildDescription ( string $actual, string $expected )
$actual string The actual string.
$expected string The expected string.

actual() public static method

Returns the output generated by the closure.
public static actual ( Closure $actual ) : string
$actual Closure The actual closure.
return string The string result.

description() public static method

Returns the description report.
public static description ( )

match() public static method

Checks that $actual echo the $expected string.
public static match ( Closure $actual, mixed $expected = null ) : boolean
$actual Closure The closure to run.
$expected mixed The expected string.
return boolean

Property Details

$_description public_oe static_oe property

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