|
@@ 146-164 (lines=19) @@
|
| 143 |
|
* @preserveGlobalState disabled |
| 144 |
|
* @runInSeparateProcess |
| 145 |
|
*/ |
| 146 |
|
public function test_single_plugin_filemap() { |
| 147 |
|
$path_map = array(); |
| 148 |
|
$this->single_manifest_handler->register_plugin_manifests( |
| 149 |
|
'vendor/composer/jetpack_autoload_filemap.php', |
| 150 |
|
$path_map |
| 151 |
|
); |
| 152 |
|
|
| 153 |
|
$loader = new Version_Loader( |
| 154 |
|
new Version_Selector(), |
| 155 |
|
null, |
| 156 |
|
null, |
| 157 |
|
$path_map |
| 158 |
|
); |
| 159 |
|
|
| 160 |
|
$loader->load_filemap(); |
| 161 |
|
|
| 162 |
|
$this->assertTrue( $GLOBALS['__composer_autoload_files']['123456acbdefg'] ); |
| 163 |
|
$this->assertTrue( function_exists( '\\Jetpack\\AutoloaderTestData\\PluginCurrent\\if_i_exist_then_this_test_passed' ) ); |
| 164 |
|
} |
| 165 |
|
|
| 166 |
|
/** |
| 167 |
|
* Tests that the filemap manifest from multiple plugins can be handled correctly. |
|
@@ 172-190 (lines=19) @@
|
| 169 |
|
* @preserveGlobalState disabled |
| 170 |
|
* @runInSeparateProcess |
| 171 |
|
*/ |
| 172 |
|
public function test_multiple_plugin_filemap() { |
| 173 |
|
$path_map = array(); |
| 174 |
|
$this->multiple_manifest_handler->register_plugin_manifests( |
| 175 |
|
'vendor/composer/jetpack_autoload_filemap.php', |
| 176 |
|
$path_map |
| 177 |
|
); |
| 178 |
|
|
| 179 |
|
$loader = new Version_Loader( |
| 180 |
|
new Version_Selector(), |
| 181 |
|
null, |
| 182 |
|
null, |
| 183 |
|
$path_map |
| 184 |
|
); |
| 185 |
|
|
| 186 |
|
$loader->load_filemap(); |
| 187 |
|
|
| 188 |
|
$this->assertTrue( $GLOBALS['__composer_autoload_files']['123456acbdefg'] ); |
| 189 |
|
$this->assertTrue( function_exists( '\\Jetpack\\AutoloaderTestData\\PluginNewer\\if_i_exist_then_this_test_passed' ) ); |
| 190 |
|
} |
| 191 |
|
} |
| 192 |
|
|