When setting WP_TESTS_FORCE_KNOWN_BUGS to true, it is preferable that some forced tests are still skipped when they call classes or functions that do not exist, producing fatal errors.

Fixes #26248.



git-svn-id: https://develop.svn.wordpress.org/trunk@26370 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2013-11-25 22:49:51 +00:00
parent e683a6eb84
commit 3c671f031e
6 changed files with 43 additions and 0 deletions

View File

@@ -4,6 +4,14 @@
* @ticket 22300
*/
class Tests_Formatting_MapDeep extends WP_UnitTestCase {
function setUp() {
if ( ! function_exists( 'map_deep' ) ) {
$this->markTestSkipped( "map_deep function doesn't exist" );
}
parent::setUp();
}
function test_map_deep_with_any_function_over_empty_array_should_return_empty_array() {
$this->assertEquals( array(), map_deep( array( $this, 'return_baba' ), array() ) );
}