Changeset 52010 for trunk/tests/phpunit/tests/admin/includesPlugin.php
- Timestamp:
- 11/04/2021 03:22:47 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/admin/includesPlugin.php
r51800 r52010 13 13 } 14 14 15 function test_get_plugin_data() {15 public function test_get_plugin_data() { 16 16 $data = get_plugin_data( DIR_TESTDATA . '/plugins/hello.php' ); 17 17 … … 36 36 } 37 37 38 function test_menu_page_url() {38 public function test_menu_page_url() { 39 39 $current_user = get_current_user_id(); 40 40 wp_set_current_user( self::factory()->user->create( array( 'role' => 'administrator' ) ) ); … … 78 78 * @dataProvider data_submenu_position 79 79 */ 80 function test_submenu_position( $position, $expected_position ) {80 public function test_submenu_position( $position, $expected_position ) { 81 81 global $submenu; 82 82 global $menu; … … 126 126 * @dataProvider data_submenu_position 127 127 */ 128 function test_submenu_helpers_position( $position, $expected_position ) {128 public function test_submenu_helpers_position( $position, $expected_position ) { 129 129 global $submenu; 130 130 global $menu; … … 228 228 * } 229 229 */ 230 function submenus_to_add() {230 private function submenus_to_add() { 231 231 return array( 232 232 array( 'Submenu Position', 'Submenu Position', 'manage_options', 'sub-page', '' ), … … 250 250 * } 251 251 */ 252 function data_submenu_position() {252 public function data_submenu_position() { 253 253 $menu_count = count( $this->submenus_to_add() ); 254 254 return array( … … 269 269 * @ticket 48599 270 270 */ 271 function test_position_when_parent_slug_child_slug_are_the_same() {271 public function test_position_when_parent_slug_child_slug_are_the_same() { 272 272 global $submenu, $menu; 273 273 … … 301 301 * @ticket 48599 302 302 */ 303 function test_passing_string_as_position_fires_doing_it_wrong() {303 public function test_passing_string_as_position_fires_doing_it_wrong() { 304 304 $this->setExpectedIncorrectUsage( 'add_submenu_page' ); 305 305 global $submenu, $menu; … … 325 325 } 326 326 327 function test_is_plugin_active_true() {327 public function test_is_plugin_active_true() { 328 328 activate_plugin( 'hello.php' ); 329 329 $test = is_plugin_active( 'hello.php' ); … … 333 333 } 334 334 335 function test_is_plugin_active_false() {335 public function test_is_plugin_active_false() { 336 336 deactivate_plugins( 'hello.php' ); 337 337 $test = is_plugin_active( 'hello.php' ); … … 339 339 } 340 340 341 function test_is_plugin_inactive_true() {341 public function test_is_plugin_inactive_true() { 342 342 deactivate_plugins( 'hello.php' ); 343 343 $test = is_plugin_inactive( 'hello.php' ); … … 345 345 } 346 346 347 function test_is_plugin_inactive_false() {347 public function test_is_plugin_inactive_false() { 348 348 activate_plugin( 'hello.php' ); 349 349 $test = is_plugin_inactive( 'hello.php' );
Note: See TracChangeset
for help on using the changeset viewer.