Changeset 52389 for trunk/tests/phpunit/tests/admin/includesPlugin.php
- Timestamp:
- 12/19/2021 01:42:37 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/admin/includesPlugin.php
r52010 r52389 488 488 489 489 $dropins = get_dropins(); 490 $this->assertSame( array( 'advanced-cache.php' ), array_keys( $dropins ) );491 490 492 491 unlink( $p1[1] ); 493 492 unlink( $p2[1] ); 494 493 494 $this->assertSame( array( 'advanced-cache.php' ), array_keys( $dropins ) ); 495 495 496 // Clean up. 496 497 $this->_restore_drop_ins(); … … 510 511 $p = $this->_create_plugin( "<?php\n/*\nPlugin Name: test\nNetwork: true" ); 511 512 512 $ this->assertTrue( is_network_only_plugin( $p[0] ));513 $network_only = is_network_only_plugin( $p[0] ); 513 514 514 515 unlink( $p[1] ); 516 517 $this->assertTrue( $network_only ); 515 518 } 516 519 … … 572 575 update_option( 'uninstall_plugins', $uninstallable_plugins ); 573 576 574 $ this->assertTrue( is_uninstallable_plugin( $plugin[0] ));577 $is_uninstallable = is_uninstallable_plugin( $plugin[0] ); 575 578 576 579 unset( $uninstallable_plugins[ $plugin[0] ] ); … … 578 581 579 582 unlink( $plugin[1] ); 583 584 $this->assertTrue( $is_uninstallable ); 580 585 } 581 586 … … 596 601 private function _create_plugin( $data = "<?php\n/*\nPlugin Name: Test\n*/", $filename = false, $dir_path = false ) { 597 602 if ( false === $filename ) { 598 $filename = rand_str(). '.php';603 $filename = __FUNCTION__ . '.php'; 599 604 } 600 605 … … 603 608 } 604 609 605 $full_name = $dir_path . '/' . wp_unique_filename( $dir_path, $filename ); 610 $filename = wp_unique_filename( $dir_path, $filename ); 611 $full_name = $dir_path . '/' . $filename; 606 612 607 613 $file = fopen( $full_name, 'w' );
Note: See TracChangeset
for help on using the changeset viewer.