Skip to content

Commit

Permalink
Document $message parameter in assertArrayEquals
Browse files Browse the repository at this point in the history
  • Loading branch information
thiemowmde committed Feb 10, 2016
1 parent cdeaea2 commit 466d1e3
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions tests/phpunit/DiffTestCase.php
Expand Up @@ -41,8 +41,15 @@ function( $element ) {
* @param array $actual
* @param bool $ordered If the order of the values should match
* @param bool $named If the keys should match
* @param string $message
*/
protected function assertArrayEquals( array $expected, array $actual, $ordered = false, $named = false ) {
protected function assertArrayEquals(
array $expected,
array $actual,
$ordered = false,
$named = false,
$message = ''
) {
if ( !$ordered ) {
$this->objectAssociativeSort( $expected );
$this->objectAssociativeSort( $actual );
Expand All @@ -53,10 +60,7 @@ protected function assertArrayEquals( array $expected, array $actual, $ordered =
$actual = array_values( $actual );
}

call_user_func_array(
array( $this, 'assertEquals' ),
array_merge( array( $expected, $actual ), array_slice( func_get_args(), 4 ) )
);
$this->assertEquals( $expected, $actual, $message );
}

/**
Expand Down

0 comments on commit 466d1e3

Please sign in to comment.