Changeset 49006
- Timestamp:
- 09/19/2020 03:52:03 PM (4 years ago)
- Location:
- trunk/tests/phpunit/tests/functions
- Files:
-
- 27 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/functions/addMagicQuotes.php
r48205 r49006 4 4 * @group formatting 5 5 * @group functions.php 6 * @covers ::add_magic_quotes 6 7 */ 7 8 class Tests_Functions_AddMagicQuotes extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/functions/allowedProtocols.php
r48939 r49006 4 4 * @group formatting 5 5 * @group functions.php 6 * @covers ::wp_allowed_protocols 6 7 */ 7 8 class Tests_Functions_AllowedProtocols extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/functions/anonymization.php
r48937 r49006 11 11 * Class Tests_Functions_Anonymization. 12 12 * 13 * @since 4.9.6 14 * 13 15 * @group functions.php 14 16 * @group privacy 15 * 16 * @since 4.9.6 17 * @covers ::wp_privacy_anonymize_data 17 18 */ 18 19 class Tests_Functions_Anonymization extends WP_UnitTestCase { 20 19 21 /** 20 22 * Test that wp_privacy_anonymize_ip() properly anonymizes all possible IP address formats. -
trunk/tests/phpunit/tests/functions/canonicalCharset.php
r48937 r49006 1 1 <?php 2 2 3 /* 3 /** 4 4 * Validate that badly named charsets always return the correct format for UTF-8 and ISO-8859-1. 5 5 * 6 * @since 4.8.0 6 * @since 4.8.0 7 * 8 * @group functions.php 9 * @covers ::_canonical_charset 7 10 */ 8 9 11 class Tests_Functions_CanonicalCharset extends WP_UnitTestCase { 10 12 … … 51 53 /** 52 54 * @ticket 23688 55 * 56 * @covers ::get_option 53 57 */ 54 58 function test_update_option_blog_charset() { -
trunk/tests/phpunit/tests/functions/cleanupHeaderComment.php
r48937 r49006 1 1 <?php 2 /* 2 /** 3 3 * Test _cleanup_header_comment(). 4 4 * 5 * @group functions.php6 5 * @ticket 8497 7 6 * @ticket 38101 7 * 8 * @group functions.php 9 * @covers ::_cleanup_header_comment 8 10 */ 9 11 class Tests_Functions_CleanupHeaderComment extends WP_UnitTestCase { 12 10 13 /** 11 14 * Test cleanup header of header comment. 12 15 * 13 * @covers ::_cleanup_header_comment14 16 * @dataProvider data_cleanup_header_comment 15 17 * -
trunk/tests/phpunit/tests/functions/deprecated.php
r48221 r49006 4 4 * Test cases for deprecated functions, arguments, and files 5 5 * 6 * @package 6 * @package WordPress 7 7 * @subpackage Unit Tests 8 * @since 3.5.0 9 * @group deprecated 8 * 9 * @since 3.5.0 10 * 11 * @group functions.php 12 * @group deprecated 10 13 */ 11 14 class Tests_Functions_Deprecated extends WP_UnitTestCase { … … 141 144 * @ticket 6821 142 145 * @expectedDeprecated wp_save_image_file 146 * 147 * @covers ::wp_save_image_file 143 148 */ 144 149 public function test_wp_save_image_file_deprecated_with_gd_resource() { … … 164 169 * 165 170 * @ticket 6821 171 * 172 * @covers ::wp_save_image_file 166 173 */ 167 174 public function test_wp_save_image_file_not_deprecated_with_wp_image_editor() { -
trunk/tests/phpunit/tests/functions/doEnclose.php
r48848 r49006 11 11 * Tests_Functions_DoEnclose class. 12 12 * 13 * @since 5.3.0 14 * 13 15 * @group functions.php 14 16 * @group post 15 17 * @covers ::do_enclose 16 *17 * @since 5.3.018 18 */ 19 19 class Tests_Functions_DoEnclose extends WP_UnitTestCase { … … 254 254 * 255 255 * @param int $post_id Post ID. 256 * @return string 256 * @return string All enclosure data for the given post. 257 257 */ 258 258 protected function get_enclosed_by_post_id( $post_id ) { -
trunk/tests/phpunit/tests/functions/getStatusHeaderDesc.php
r47780 r49006 7 7 * 8 8 * @group functions.php 9 * @covers ::get_status_header_desc 9 10 */ 10 11 class Tests_Functions_GetStatusHeaderDesc extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/functions/getWeekstartend.php
r48937 r49006 3 3 /** 4 4 * @group functions.php 5 * @covers ::get_weekstartend 5 6 */ 6 7 class Tests_Functions_GetWeekstartend extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/functions/isNewDay.php
r47780 r49006 6 6 * 7 7 * @group functions.php 8 * @covers ::is_new_day 8 9 */ 9 10 class Tests_Functions_IsNewDate extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/functions/isSerializedString.php
r47780 r49006 4 4 * Tests for `is_serialized_string()`. 5 5 * 6 * @ticket 42870 7 * 6 8 * @group functions.php 7 * @ ticket 428709 * @covers ::is_serialized_string 8 10 */ 9 11 class Tests_Functions_IsSerializedString extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/functions/listFiles.php
r46586 r49006 5 5 * 6 6 * @group functions.php 7 * @covers ::list_files 7 8 */ 8 9 class Tests_Functions_ListFiles extends WP_UnitTestCase { 10 9 11 public function test_list_files_returns_a_list_of_files() { 10 12 $admin_files = list_files( ABSPATH . 'wp-admin/' ); -
trunk/tests/phpunit/tests/functions/numberFormatI18n.php
r48937 r49006 6 6 * @group functions.php 7 7 * @group i18n 8 * @covers ::number_format_i18n 8 9 */ 9 10 class Tests_Functions_NumberFormatI18n extends WP_UnitTestCase { 11 10 12 public function test_should_fall_back_to_number_format_when_wp_locale_is_not_set() { 11 13 $locale = clone $GLOBALS['wp_locale']; -
trunk/tests/phpunit/tests/functions/pluginBasename.php
r47780 r49006 6 6 * @group functions.php 7 7 * @group plugins 8 * @covers ::plugin_basename 8 9 */ 9 10 class Tests_Functions_PluginBasename extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/functions/referer.php
r42343 r49006 5 5 * 6 6 * @group functions.php 7 * @covers ::wp_get_referer 8 * @covers ::wp_get_raw_referer 7 9 */ 8 10 class Tests_Functions_Referer extends WP_UnitTestCase { 11 9 12 public function setUp() { 10 13 parent::setUp(); -
trunk/tests/phpunit/tests/functions/removeQueryArg.php
r48937 r49006 3 3 /** 4 4 * @group functions.php 5 * @covers ::remove_query_arg 5 6 */ 6 7 class Tests_Functions_RemoveQueryArg extends WP_UnitTestCase { 8 7 9 /** 8 10 * @dataProvider remove_query_arg_provider -
trunk/tests/phpunit/tests/functions/sizeFormat.php
r47780 r49006 4 4 * Tests for size_format() 5 5 * 6 * @ticket 36635 7 * 6 8 * @group functions.php 7 * @ ticket 366359 * @covers ::size_format 8 10 */ 9 11 class Tests_Functions_SizeFormat extends WP_UnitTestCase { 12 10 13 public function _data_size_format() { 11 14 return array( -
trunk/tests/phpunit/tests/functions/underscoreReturn.php
r47780 r49006 9 9 class Tests_Functions_UnderscoreReturn extends WP_UnitTestCase { 10 10 11 /** 12 * @covers ::__return_true 13 */ 11 14 public function test__return_true() { 12 15 $this->assertTrue( __return_true() ); 13 16 } 14 17 18 /** 19 * @covers ::__return_false 20 */ 15 21 public function test__return_false() { 16 22 $this->assertFalse( __return_false() ); 17 23 } 18 24 25 /** 26 * @covers ::__return_zero 27 */ 19 28 public function test__return_zero() { 20 29 $this->assertSame( 0, __return_zero() ); 21 30 } 22 31 32 /** 33 * @covers ::__return_empty_array 34 */ 23 35 public function test__return_empty_array() { 24 36 $this->assertSame( array(), __return_empty_array() ); 25 37 } 26 38 39 /** 40 * @covers ::__return_null 41 */ 27 42 public function test__return_null() { 28 43 $this->assertNull( __return_null() ); 29 44 } 30 45 46 /** 47 * @covers ::__return_empty_string 48 */ 31 49 public function test__return_empty_string() { 32 50 $this->assertSame( '', __return_empty_string() ); -
trunk/tests/phpunit/tests/functions/wp.php
r47212 r49006 4 4 * @group functions.php 5 5 * @group query 6 * @covers ::wp 6 7 */ 7 8 class Tests_Functions_WP extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/functions/wpArraySliceAssoc.php
r48848 r49006 6 6 * @since 5.3.0 7 7 * 8 * @group functions.php 8 9 * @covers ::wp_array_slice_assoc 9 * @group functions.php10 10 */ 11 11 class Tests_Functions_wpArraySliceAssoc extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/functions/wpAuthCheck.php
r47780 r49006 5 5 * 6 6 * @group functions.php 7 * @covers ::is_user_logged_in 8 * @covers ::wp_auth_check 7 9 */ 8 10 class Tests_Functions_wpAuthCheck extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/functions/wpGetArchives.php
r48937 r49006 1 1 <?php 2 /* 3 $defaults = array( 4 'type' => 'monthly', 'limit' => '', 5 'format' => 'html', 'before' => '', 6 'after' => '', 'show_post_count' => false, 7 'echo' => 1, 'order' => 'DESC', 8 ); 9 */ 2 3 /** 4 * @group functions.php 5 * @covers ::wp_get_archives 6 */ 10 7 class Tests_Functions_wpGetArchives extends WP_UnitTestCase { 11 8 protected static $post_ids; -
trunk/tests/phpunit/tests/functions/wpGetMimeTypes.php
r47780 r49006 5 5 * 6 6 * @group functions.php 7 * @covers ::wp_get_mime_types 7 8 */ 8 9 class Tests_Functions_wpGetMimeTypes extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/functions/wpListFilter.php
r48937 r49006 5 5 * 6 6 * @group functions.php 7 * @covers ::wp_filter_object_list 8 * @covers ::wp_list_pluck 7 9 */ 8 10 class Tests_Functions_wpListFilter extends WP_UnitTestCase { … … 318 320 } 319 321 320 321 322 function test_filter_object_list_nested_array_and_field() { 322 323 $list = wp_filter_object_list( $this->object_list, array( 'field4' => array( 'blue' ) ), 'AND', 'name' ); -
trunk/tests/phpunit/tests/functions/wpListUtil.php
r48939 r49006 155 155 /** 156 156 * @dataProvider data_test_wp_list_pluck 157 * 158 * @covers ::wp_list_pluck 157 159 * 158 160 * @param array $list List of objects or arrays. … … 359 361 /** 360 362 * @dataProvider data_test_wp_list_filter 363 * 364 * @covers ::wp_list_filter 361 365 * 362 366 * @param array $list An array of objects to filter. … … 687 691 * @dataProvider data_test_wp_list_sort 688 692 * 693 * @covers ::wp_list_sort 694 * 689 695 * @param string|array $orderby Either the field name to order by or an array 690 696 * of multiple orderby fields as $orderby => $order. … … 1011 1017 /** 1012 1018 * @dataProvider data_test_wp_list_sort_preserve_keys 1019 * 1020 * @covers ::wp_list_sort 1013 1021 * 1014 1022 * @param string|array $orderby Either the field name to order by or an array … … 1020 1028 } 1021 1029 1030 /** 1031 * @covers WP_List_Util::get_input 1032 */ 1022 1033 public function test_wp_list_util_get_input() { 1023 1034 $input = array( 'foo', 'bar' ); … … 1027 1038 } 1028 1039 1040 /** 1041 * @covers WP_List_Util::get_output 1042 */ 1029 1043 public function test_wp_list_util_get_output_immediately() { 1030 1044 $input = array( 'foo', 'bar' ); … … 1034 1048 } 1035 1049 1050 /** 1051 * @covers WP_List_Util::get_output 1052 */ 1036 1053 public function test_wp_list_util_get_output() { 1037 1054 $expected = array( -
trunk/tests/phpunit/tests/functions/wpRemoteFopen.php
r48937 r49006 4 4 * @group external-http 5 5 * @group functions.php 6 * @covers ::wp_remote_fopen 6 7 */ 7 8 class Tests_Functions_wpRemoteFopen extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/functions/wpValidateBoolean.php
r47780 r49006 4 4 * Tests the wp_validate_boolean function. 5 5 * 6 * @group functions.php 6 7 * @covers ::wp_validate_boolean 7 * @group functions.php8 8 */ 9 9 class Tests_Functions_wpValidateBoolean extends WP_UnitTestCase { … … 48 48 * @dataProvider data_provider 49 49 * 50 * @param mixed $test_value .51 * @param bool $expected .50 * @param mixed $test_value 51 * @param bool $expected 52 52 * 53 53 * @ticket 30238
Note: See TracChangeset
for help on using the changeset viewer.