From 4dd59fd9ce7291af2944c5b807bab6084bcd28b6 Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Wed, 21 Jan 2015 17:57:15 +0000 Subject: [PATCH] Remove skipped unit tests related to proposed `map_deep()`. The tests have been added as a patch to #22300. See #30284. git-svn-id: https://develop.svn.wordpress.org/trunk@31256 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/formatting/MapDeep.php | 63 ---------------------- 1 file changed, 63 deletions(-) delete mode 100644 tests/phpunit/tests/formatting/MapDeep.php diff --git a/tests/phpunit/tests/formatting/MapDeep.php b/tests/phpunit/tests/formatting/MapDeep.php deleted file mode 100644 index 7ed88feae2..0000000000 --- a/tests/phpunit/tests/formatting/MapDeep.php +++ /dev/null @@ -1,63 +0,0 @@ -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() ) ); - } - - function test_map_deep_should_map_each_element_of_array_one_level_deep() { - $this->assertEquals( array( 'ababa', 'xbaba' ), map_deep( array( $this, 'append_baba' ), array( 'a', 'x' ) ) ); - } - - function test_map_deep_should_map_each_element_of_array_two_levels_deep() { - $this->assertEquals( array( 'ababa', array( 'xbaba' ) ), map_deep( array( $this, 'append_baba' ), array( 'a', array( 'x' ) ) ) ); - } - - function test_map_deep_should_map_each_object_element_of_an_array() { - $this->assertEquals( array( 'var0' => 'ababa', 'var1' => (object)array( 'xbaba' ) ), - map_deep( array( $this, 'append_baba' ), array( 'var0' => 'a', 'var1' => (object)array( 'x' ) ) ) ); - } - - function test_map_deep_should_apply_the_function_to_a_string() { - $this->assertEquals( 'xbaba', map_deep( array( $this, 'append_baba' ), 'x' ) ); - } - - function test_map_deep_should_apply_the_function_to_an_integer() { - $this->assertEquals( '5baba' , map_deep( array( $this, 'append_baba' ), 5 ) ); - } - - function test_map_deep_should_map_each_property_of_an_object() { - $this->assertEquals( (object)array( 'var0' => 'ababa', 'var1' => 'xbaba' ), - map_deep( array( $this, 'append_baba' ), (object)array( 'var0' => 'a', 'var1' => 'x' ) ) ); - } - - function test_map_deep_should_map_each_array_property_of_an_object() { - $this->assertEquals( (object)array( 'var0' => 'ababa', 'var1' => array( 'xbaba' ) ), - map_deep( array( $this, 'append_baba' ), (object)array( 'var0' => 'a', 'var1' => array( 'x' ) ) ) ); - } - - function test_map_deep_should_map_each_object_property_of_an_object() { - $this->assertEquals( (object)array( 'var0' => 'ababa', 'var1' => (object)array( 'xbaba' ) ), - map_deep( array( $this, 'append_baba' ), (object)array( 'var0' => 'a', 'var1' => (object)array( 'x' ) ) ) ); - } - - function return_baba( $value ) { - return 'baba'; - } - - function append_baba( $value ) { - return $value . 'baba'; - } -} -