Changeset 41806 for trunk/tests/phpunit/tests/admin/includesPlugin.php
- Timestamp:
- 10/10/2017 05:33:57 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/admin/includesPlugin.php
r35242 r41806 95 95 96 96 /** 97 * @covers ::get_plugin_files 98 */ 99 public function test_get_plugin_files_folder() { 100 $plugin_dir = WP_PLUGIN_DIR . '/list_files_test_plugin'; 101 @mkdir( $plugin_dir ); 102 $plugin = $this->_create_plugin(null, 'list_files_test_plugin.php', $plugin_dir ); 103 104 $sub_dir = trailingslashit( dirname( $plugin[1] ) ) . 'subdir'; 105 @mkdir( $sub_dir ); 106 @file_put_contents( $sub_dir . '/subfile.php', '<?php // Silence.' ); 107 108 $plugin_files = get_plugin_files( plugin_basename( $plugin[1] ) ); 109 $expected = array( 110 'list_files_test_plugin/list_files_test_plugin.php', 111 'list_files_test_plugin/subdir/subfile.php', 112 ); 113 $this->assertEquals( $expected, $plugin_files ); 114 115 unlink( $sub_dir . '/subfile.php' ); 116 unlink( $plugin[1] ); 117 rmdir( $sub_dir ); 118 rmdir( $plugin_dir ); 119 } 120 121 /** 97 122 * @covers ::get_mu_plugins 98 123 */
Note: See TracChangeset
for help on using the changeset viewer.