Changeset 26370
- Timestamp:
- 11/25/2013 10:49:51 PM (11 years ago)
- Location:
- trunk/tests/phpunit/tests
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/dependencies/scripts.php
r25002 r26370 98 98 */ 99 99 function test_json_encode_should_not_encode_special_literal_values() { 100 if ( ! class_exists( 'WP_JS_Literal' ) ) { 101 $this->markTestSkipped( "WP_JS_Literal class doesn't exist" ); 102 } 103 100 104 $literal = new WP_JS_Literal( 'baba()' ); 101 105 $this->assertEquals( '{"x":baba()}', WP_JS_Literal::json_encode( array( 'x' => $literal ), array( $literal ) ) ); … … 106 110 */ 107 111 function test_json_encode_should_not_encode_special_literal_values_with_dependencies() { 112 if ( ! class_exists( 'WP_JS_Literal' ) ) { 113 $this->markTestSkipped( "WP_JS_Literal class doesn't exist" ); 114 } 115 108 116 $literal = new WP_JS_Literal( 'baba()', array( 'dep0', 'dep1' ) ); 109 117 $this->assertEquals( '{"x":baba()}', WP_JS_Literal::json_encode( array( 'x' => $literal ), array( $literal ) ) ); -
trunk/tests/phpunit/tests/export/class-wp-export-query.php
r25002 r26370 8 8 */ 9 9 class Test_WP_Export_Query extends WP_UnitTestCase { 10 function setUp() { 11 if ( ! class_exists( 'WP_Export_Query' ) ) { 12 $this->markTestSkipped( "WP_Export_Query class doesn't exist" ); 13 } 14 15 parent::setUp(); 16 } 17 10 18 function test_WP_Export_Query_should_be_initialized_with_an_array() { 11 19 $export = new WP_Export_Query( array( 'author' => 'all' ) ); -
trunk/tests/phpunit/tests/export/functions.export.php
r25002 r26370 8 8 */ 9 9 class Test_WP_Export_Functions extends WP_UnitTestCase { 10 function setUp() { 11 if ( ! function_exists( 'wp_export' ) ) { 12 $this->markTestSkipped( "wp_export function doesn't exist" ); 13 } 14 15 parent::setUp(); 16 } 17 10 18 function test_wp_export_returns_wp_error_if_the_writer_throws_Export_exception() { 11 19 $this->assertTrue( is_wp_error( wp_export( array( 'writer' => 'Test_WP_Export_Stub_Writer_Throws_Export_Exception' ) ) ) ); -
trunk/tests/phpunit/tests/export/writers.php
r25002 r26370 9 9 class Test_WP_Export_Writers extends WP_UnitTestCase { 10 10 function test_export_returner_returns_all_the_return_values() { 11 if ( ! class_exists( 'WP_Export_Returner' ) ) { 12 $this->markTestSkipped( "WP_Export_Returner class doesn't exist" ); 13 } 11 14 $returner = new WP_Export_Returner( $this->get_x_formatter() ); 12 15 $this->assertEquals( 'xxx' , $returner->export() ); -
trunk/tests/phpunit/tests/formatting/MapDeep.php
r25002 r26370 5 5 */ 6 6 class Tests_Formatting_MapDeep extends WP_UnitTestCase { 7 function setUp() { 8 if ( ! function_exists( 'map_deep' ) ) { 9 $this->markTestSkipped( "map_deep function doesn't exist" ); 10 } 11 12 parent::setUp(); 13 } 14 7 15 function test_map_deep_with_any_function_over_empty_array_should_return_empty_array() { 8 16 $this->assertEquals( array(), map_deep( array( $this, 'return_baba' ), array() ) ); -
trunk/tests/phpunit/tests/iterators.php
r25002 r26370 5 5 */ 6 6 class Test_WP_Post_IDs_Iterator extends WP_UnitTestCase { 7 function setUp() { 8 if ( ! class_exists( 'WP_Post_IDs_Iterator' ) ) { 9 $this->markTestSkipped( "WP_Post_IDs_Iterator class doesn't exist" ); 10 } 11 12 parent::setUp(); 13 } 14 7 15 function test_create() { 8 16 new WP_Post_IDs_Iterator( array( 1, 2, 3 ) );
Note: See TracChangeset
for help on using the changeset viewer.