Changeset 49190 for trunk/tests/phpunit/tests/admin/includesListTable.php
- Timestamp:
- 10/18/2020 04:20:07 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/admin/includesListTable.php
r48943 r49190 354 354 355 355 /** 356 * @ticket 19278 357 */ 358 public function test_bulk_action_menu_supports_options_and_optgroups() { 359 $table = _get_list_table( 'WP_Comments_List_Table', array( 'screen' => 'edit-comments' ) ); 360 361 add_filter( 362 'bulk_actions-edit-comments', 363 function() { 364 return array( 365 'delete' => 'Delete', 366 'Change State' => array( 367 'feature' => 'Featured', 368 'sale' => 'On Sale', 369 ), 370 ); 371 } 372 ); 373 374 ob_start(); 375 $table->bulk_actions(); 376 $output = ob_get_clean(); 377 378 $this->assertContains( 379 <<<'OPTIONS' 380 <option value="delete">Delete</option> 381 <optgroup label="Change State"> 382 <option value="feature">Featured</option> 383 <option value="sale">On Sale</option> 384 </optgroup> 385 OPTIONS 386 , 387 $output 388 ); 389 } 390 391 /** 356 392 * @ticket 45089 357 393 */
Note: See TracChangeset
for help on using the changeset viewer.