2345 | | $test_plugins_enabled = apply_filters( 'auto_update_plugin', true ); |
2346 | | $test_themes_enabled = apply_filters( 'auto_update_theme', true ); |
| 2345 | $mock_plugin = (object) array( |
| 2346 | 'id' => 'w.org/plugins/a-fake-plugin', |
| 2347 | 'slug' => 'a-fake-plugin', |
| 2348 | 'plugin' => 'a-fake-plugin/a-fake-plugin.php', |
| 2349 | 'new_version' => '9.9', |
| 2350 | 'url' => 'https://wordpress.org/plugins/a-fake-plugin', |
| 2351 | 'package' => 'https://downloads.wordpress.org/plugin/a-fake-plugin.9.9.zip', |
| 2352 | 'icons' => array( |
| 2353 | '2x' => 'https://ps.w.org/a-fake-plugin/assets/icon-256x256.png', |
| 2354 | '1x' => 'https://ps.w.org/a-fake-plugin/assets/icon-128x128.png', |
| 2355 | ), |
| 2356 | 'banners' => array( |
| 2357 | '2x' => 'https://ps.w.org/a-fake-plugin/assets/banner-1544x500.png', |
| 2358 | '1x' => 'https://ps.w.org/a-fake-plugin/assets/banner-772x250.png', |
| 2359 | ), |
| 2360 | 'banners_rtl' => array(), |
| 2361 | 'tested' => `5.5.0`, |
| 2362 | 'requires_php' => '5.6.20', |
| 2363 | 'compatibility' => new stdClass(), |
| 2364 | ); |
| 2365 | |
| 2366 | $mock_theme = (object) array( |
| 2367 | 'theme' => 'a-fake-theme', |
| 2368 | 'new_version' => '9.9', |
| 2369 | 'url' => '', |
| 2370 | 'package' => '', |
| 2371 | 'requires' => '5.0.0', |
| 2372 | 'requires_php' => '5.6.20', |
| 2373 | ); |
| 2374 | |
| 2375 | $test_plugins_enabled = apply_filters( 'auto_update_plugin', true, $mock_plugin ); |
| 2376 | $test_themes_enabled = apply_filters( 'auto_update_theme', true, $mock_theme ); |