Changeset 25170
- Timestamp:
- 08/29/2013 06:58:40 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/functions.php
r25002 r25170 337 337 update_option( 'blog_charset', $orig_blog_charset ); 338 338 } 339 340 /** 341 * @dataProvider data_wp_parse_id_list 342 */ 343 function test_wp_parse_id_list( $expected, $actual ) { 344 $this->assertSame( $expected, array_values( wp_parse_id_list( $actual ) ) ); 345 } 346 347 function data_wp_parse_id_list() { 348 return array( 349 array( array( 1, 2, 3, 4 ), '1,2,3,4' ), 350 array( array( 1, 2, 3, 4 ), '1, 2,,3,4' ), 351 array( array( 1, 2, 3, 4 ), '1,2,2,3,4' ), 352 array( array( 1, 2, 3, 4 ), array( '1', '2', '3', '4', '3' ) ), 353 array( array( 1, 2, 3, 4 ), array( 1, '2', 3, '4' ) ), 354 array( array( 1, 2, 3, 4 ), '-1,2,-3,4' ), 355 array( array( 1, 2, 3, 4 ), array( -1, 2, '-3', '4' ) ), 356 ); 357 } 339 358 }
Note: See TracChangeset
for help on using the changeset viewer.