PHP Class PHPUnit_Extensions_Assert_More

Exibir arquivo Open project: etsy/phpunit-extensions Class Usage Examples

Public Methods

Method Description
assertArrayEqualsNoOrder ( array $expected, array $actual, string $message = '' ) Asserts that the two arrays contain the same exact contents, but are not necessarily the same order.
assertArrayHasKeyValuePair ( string | integer $expectedKey, mixed $expectedValue, array $actual, $message = '' ) Asserts that the actual array contains a specified key/value pair.
assertHasItems ( array $expected, array $actual, $message = '' ) Asserts that the actual array contains at least one occurence of each of the values in the expected array.
assertStringMatchIgnoreWhitespace ( array $expected, array $actual, string $message = '' ) Asserts that the two strings match but that all whitespaces are not necessarily equal.

Private Methods

Method Description
__construct ( )

Method Details

assertArrayEqualsNoOrder() public static method

Asserts that the two arrays contain the same exact contents, but are not necessarily the same order.
public static assertArrayEqualsNoOrder ( array $expected, array $actual, string $message = '' )
$expected array
$actual array
$message string

assertArrayHasKeyValuePair() public static method

Asserts that the actual array contains a specified key/value pair.
public static assertArrayHasKeyValuePair ( string | integer $expectedKey, mixed $expectedValue, array $actual, $message = '' )
$expectedKey string | integer
$expectedValue mixed
$actual array
$message

assertHasItems() public static method

Asserts that the actual array contains at least one occurence of each of the values in the expected array.
public static assertHasItems ( array $expected, array $actual, $message = '' )
$expected array
$actual array
$message

assertStringMatchIgnoreWhitespace() public static method

Asserts that the two strings match but that all whitespaces are not necessarily equal.
public static assertStringMatchIgnoreWhitespace ( array $expected, array $actual, string $message = '' )
$expected array
$actual array
$message string