Changeset 51135 for trunk/tests/phpunit/includes/abstract-testcase.php
- Timestamp:
- 06/09/2021 07:41:47 PM (5 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/includes/abstract-testcase.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/abstract-testcase.php
r50913 r51135 661 661 * 662 662 * @since 5.6.0 663 * 664 * @param string $expected The expected value. 665 * @param string $actual The actual value. 663 * @since 5.8.0 Added support for nested arrays. 664 * 665 * @param string|array $expected The expected value. 666 * @param string|array $actual The actual value. 666 667 */ 667 668 public function assertSameIgnoreEOL( $expected, $actual ) { 668 $this->assertSame( str_replace( "\r\n", "\n", $expected ), str_replace( "\r\n", "\n", $actual ) ); 669 $expected = map_deep( 670 $expected, 671 function ( $value ) { 672 return str_replace( "\r\n", "\n", $value ); 673 } 674 ); 675 676 $actual = map_deep( 677 $actual, 678 function ( $value ) { 679 return str_replace( "\r\n", "\n", $value ); 680 } 681 ); 682 683 $this->assertSame( $expected, $actual ); 669 684 } 670 685
Note: See TracChangeset
for help on using the changeset viewer.