diff --git a/src/src/Environment/EnvConfigLoader.php b/src/src/Environment/EnvConfigLoader.php index e93429f7..0bc8ccaa 100644 --- a/src/src/Environment/EnvConfigLoader.php +++ b/src/src/Environment/EnvConfigLoader.php @@ -41,7 +41,6 @@ public function init_env_info( ): EnvInfo { // Load the environment config file.. $env_config = $this->load_config(); - $this->normalize_plural_to_singular( $env_config ); // Check that config file doesn't contain disallowed keys. foreach ( EnvInfo::$not_user_configurable as $d ) { @@ -74,6 +73,8 @@ public function init_env_info( } } + $this->normalize_plural_to_singular( $env_config ); + // Plugins and Themes. $env_config['plugin'] = $this->plugins_and_themes_parser->parse_extensions( $env_config['plugin'] ?? [], diff --git a/src/src/Environment/ExtensionDownload/ExtensionDownloader.php b/src/src/Environment/ExtensionDownload/ExtensionDownloader.php index 953e5878..1affe499 100644 --- a/src/src/Environment/ExtensionDownload/ExtensionDownloader.php +++ b/src/src/Environment/ExtensionDownload/ExtensionDownloader.php @@ -117,6 +117,21 @@ public function categorize_extensions( array $plugins, array $themes ): array { ] as $type => $extensions ) { foreach ( $extensions as $ext ) { + if ( ! $ext instanceof Extension ) { + throw new \LogicException( 'Invalid extension object.' ); + } + + // At this point, source for all extensions should be set. + if ( empty( $ext->source ) ) { + throw new \LogicException( 'Extension source is required.' ); + } + + // At this point, slug should already be inferred from the source. + if ( empty( $ext->slug ) ) { + throw new \LogicException( 'Extension slug should be defined at this point.' ); + } + + // @phan-suppress-next-line PhanPossiblyUndeclaredVariable if ( array_key_exists( $ext->slug, $categorized_extensions ) ) { throw new \InvalidArgumentException( 'Duplicate extension found.' ); } diff --git a/src/src/Environment/PluginsAndThemesParser.php b/src/src/Environment/PluginsAndThemesParser.php index f294aa12..81fcf5b4 100644 --- a/src/src/Environment/PluginsAndThemesParser.php +++ b/src/src/Environment/PluginsAndThemesParser.php @@ -20,6 +20,7 @@ public function __construct( OutputInterface $output, WooExtensionsList $woo_ext /** * // phpcs:disable + * * @param array [ - 'automatewoo' => [ - 'test_tag' => 'bar', + 'qit-beaver' => [ + 'test_tags' => [ 'bar' ], ], ], ]; @@ -230,7 +230,7 @@ public function test_env_config_loader_plugins_array() { public function test_env_config_loader_plugins_string() { $complexStructure = [ 'plugins' => [ - 'automatewoo', + 'qit-beaver', ], ]; $this->create_config_file( 'qit-env.json', json_encode( $complexStructure ) ); @@ -241,15 +241,15 @@ public function test_env_config_loader_plugins_string() { public function test_env_config_loader_plugins_mixed() { $complexStructure = [ 'plugins' => [ - 'automatewoo_birthdays' => [ - 'test_tag' => 'bar', + 'qit-cat' => [ + 'test_tags' => [ 'bar' ], ], - 'automatewoo', + 'qit-beaver', ], 'themes' => [ - 'twentytwenty', - 'twentytwentyone' => [ - 'test_tag' => 'foo', + 'qit-dog', + 'foo-extension' => [ + 'test_tags' => [ 'foo' ], ], ], ]; @@ -261,24 +261,24 @@ public function test_env_config_loader_plugins_mixed() { public function test_env_config_loader_plugins_override() { $override_structure = [ 'plugins' => [ - 'automatewoo_birthdays: untrimed_override', - 'automatewoo' => [ - 'test_tag' => 'array_override', + 'qit-beaver' => [ + 'test_tags' => [ 'array_override' ], ], - 'automatewoo_source_from_key' => [ + 'qit-dog' => [ 'source' => 'source_from_value', ], - 'https://woo.com/automatewoo-url', - 'https://woo.com/automatewoo-url-array' => [ - 'test_tag' => 'test_tag_array', + 'https://woo.com/qit-beaver', + 'foo-extension' => [ + 'source' => 'https://woo.com/foo-extension', + 'test_tags' => [ 'test_tag_array' ], ], - // 'https://woo.com/automatewoo-referrals:bar', - '{"source": "https://woo.com/automatewoo-referrals", "slug": "automatewoo-referrals", "test_tag": "bar"}', - 'C:\\Users\\user\\Desktop\\automatewoo-url-windows', - 'C:\\Users\\user\\Desktop\\automatewoo-url-windows:baz', + // 'https://woo.com/qit-dog:bar', + '{"source": "https://woo.com/qit-dog", "slug": "qit-dog", "test_tags": ["bar"]}', + 'C:\\Users\\user\\Desktop\\qit-beaver', + 'C:\\Users\\user\\Desktop\\qit-beaver:install', ], 'themes' => [ - 'twentytwentyone:string_override', + 'qit-beaver:test', ], ]; $this->create_config_file( 'qit-env.json', json_encode( [] ) ); @@ -286,34 +286,14 @@ public function test_env_config_loader_plugins_override() { $this->assertMatchesJsonSnapshot( json_encode( $this->normalized_env_info( $this->sut->load_config(), $override_structure ) ) ); } - public function test_env_config_loader_plugins_url_without_source() { - $this->expectException( InvalidArgumentException::class ); - $this->create_config_file( 'qit-env.json', json_encode( [] ) ); - $this->normalized_env_info( $this->sut->load_config(), [ - 'plugins' => [ - 'https://woo.com/automatewoo-url', - ], - ] ); - } - - public function test_env_config_loader_plugins_url_without_source_json() { - $this->expectException( InvalidArgumentException::class ); - $this->create_config_file( 'qit-env.json', json_encode( [] ) ); - $this->normalized_env_info( $this->sut->load_config(), [ - 'plugins' => [ - '{"source": "https://woo.com/automatewoo-url"}', - ], - ] ); - } - public function test_env_config_loader_plugins_url_with_source() { $this->create_config_file( 'qit-env.json', json_encode( [] ) ); $this->assertMatchesJsonSnapshot( json_encode( $this->normalized_env_info( $this->sut->load_config(), [ 'plugins' => [ - 'automatewoo' => [ - 'source' => 'https://woo.com/automatewoo-url', + 'qit-beaver' => [ + 'source' => 'https://woo.com/qit-beaver', ], ], ] ) @@ -327,9 +307,9 @@ public function test_env_config_loader_plugins_url_with_source_and_tags() { json_encode( $this->normalized_env_info( $this->sut->load_config(), [ 'plugins' => [ - 'automatewoo' => [ - 'source' => 'https://woo.com/automatewoo-url', - 'test_tag' => 'rc', + 'qit-beaver' => [ + 'source' => 'https://woo.com/qit-beaver', + 'test_tags' => [ 'rc' ], ], ], ] ) @@ -343,7 +323,7 @@ public function test_env_config_loader_plugins_url_with_source_json() { json_encode( $this->normalized_env_info( $this->sut->load_config(), [ 'plugins' => [ - '{"source":"https://woo.com/automatewoo-url", "slug":"automatewoo"}', + '{"source":"https://woo.com/qit-beaver", "slug":"qit-beaver"}', ], ] ) ) @@ -356,7 +336,7 @@ public function test_env_config_loader_plugins_url_with_source_and_tags_json() { json_encode( $this->normalized_env_info( $this->sut->load_config(), [ 'plugins' => [ - '{"source":"https://woo.com/automatewoo-url", "slug":"automatewoo", "test_tag": "rc"}', + '{"source":"https://woo.com/qit-beaver", "slug":"qit-beaver", "test_tags": ["rc"]}', ], ] ) ) diff --git a/src/tests/Environment/ExtensionDownloaderTest.php b/src/tests/Environment/ExtensionDownloaderTest.php index 27f5d384..592d8f15 100644 --- a/src/tests/Environment/ExtensionDownloaderTest.php +++ b/src/tests/Environment/ExtensionDownloaderTest.php @@ -52,36 +52,77 @@ protected function tearDown(): void { parent::tearDown(); } + protected function make_extension( string $type, ?string $slug = null, $source = null ): Extension { + $extension = new Extension(); + $extension->type = $type; + + if ( ! is_null( $slug ) ) { + $extension->slug = $slug; + } + + if ( ! is_null( $source ) ) { + $extension->source = $source; + } + + if ( is_null( $source ) && ! is_null( $slug ) ) { + $extension->source = $slug; + } + + if ( empty( $extension->source ) ) { + throw new \LogicException( 'Source cannot be empty' ); + } + + if ( empty( $extension->slug ) ) { + // Set a random slug if not provided, because we need one. + $extension->slug = md5( $extension->source ); + } + + return $extension; + } + public function test_categorize_extensions() { $plugins = [ - 'plugin1', - 'plugin2', + $this->make_extension( 'plugin', slug: 'plugin1' ), + $this->make_extension( 'plugin', slug: 'plugin2' ), ]; $themes = [ - 'theme1', - 'theme2', + $this->make_extension( 'theme', slug: 'theme1' ), + $this->make_extension( 'theme', slug: 'theme2' ), ]; $this->assertMatchesJsonSnapshot( $this->sut->categorize_extensions( $plugins, $themes, '/tmp/cache/' ) ); } public function test_numeric_extensions() { - $plugins = [ '123', '456' ]; - $themes = [ '789' ]; + $plugins = [ + $this->make_extension( 'plugin', slug: 'plugin1', source: '123' ), + $this->make_extension( 'plugin', slug: 'plugin2', source: '456' ), + ]; + $themes = [ + $this->make_extension( 'theme', slug: 'theme1', source: '789' ), + ]; $this->assertMatchesJsonSnapshot( $this->sut->categorize_extensions( $plugins, $themes, '/tmp/cache/' ) ); } public function test_valid_ur_extensions() { - $plugins = [ 'http://example.com/plugin.zip', 'https://example.com/plugin2.zip' ]; + $plugins = [ + $this->make_extension( 'plugin', source: 'http://example.com/plugin.zip' ), + $this->make_extension( 'plugin', source: 'https://example.com/plugin2.zip' ), + ]; $themes = []; $this->assertMatchesJsonSnapshot( $this->sut->categorize_extensions( $plugins, $themes, '/tmp/cache/' ) ); } + /* public function test_invalid_url_extensions() { - $plugins = [ 'http://example.com/plugin', 'https://example.com/plugin2.tar.gz' ]; + $plugins = [ + $this->make_extension( 'plugin', source: 'http://example.com/plugin' ), + $this->make_extension( 'plugin', source: 'https://example.com/plugin2.tar.gz' ), + ]; $this->expectException( InvalidArgumentException::class ); $this->sut->categorize_extensions( $plugins, [], '/tmp/cache/' ); } + */ public function test_file_path_extensions() { $plugin1 = sys_get_temp_dir() . '/plugin'; @@ -94,27 +135,49 @@ public function test_file_path_extensions() { touch( $theme2 ); $this->to_delete = [ $plugin1, $plugin2, $theme1, $theme2 ]; - $plugins = [ $plugin1, $plugin2 ]; - $themes = [ $theme1, $theme2 ]; + $plugins = [ + $this->make_extension( 'plugin', source: $plugin1 ), + $this->make_extension( 'plugin', source: $plugin2 ), + ]; + $themes = [ + $this->make_extension( 'theme', source: $theme1 ), + $this->make_extension( 'theme', source: $theme2 ), + ]; $this->assertMatchesJsonSnapshot( $this->sut->categorize_extensions( $plugins, $themes, '/tmp/cache/' ) ); } public function test_github_repository_string() { - $plugins = [ 'user/repository', 'user2/repo2#branch' ]; + $plugins = [ + $this->make_extension( 'plugin', source: 'user/repository' ), + $this->make_extension( 'plugin', source: 'user2/repo2#branch' ), + ]; $this->expectException( InvalidArgumentException::class ); $this->sut->categorize_extensions( $plugins, [], '/tmp/cache/' ); } public function test_SSH_url() { - $plugins = [ 'ssh://example.com/plugin' ]; - $themes = [ 'ssh://example.com/theme' ]; + $plugins = [ + $this->make_extension( 'plugin', source: 'ssh://example.com/plugin' ), + ]; + $themes = [ + $this->make_extension( 'theme', source: 'ssh://example.com/theme' ), + ]; $this->expectException( InvalidArgumentException::class ); $this->sut->categorize_extensions( $plugins, $themes, '/tmp/cache/' ); } public function test_mixed_valid_and_invalid_extensions() { - $plugins = [ 'plugin', 'http://validurl.com/plugin.zip', 'invalidurl.com', 'user/repo' ]; - $themes = [ 'theme', '123', 'ssh://example.com/theme' ]; + $plugins = [ + $this->make_extension( 'plugin', source: 'plugin' ), + $this->make_extension( 'plugin', source: 'http://validurl.com/plugin.zip' ), + $this->make_extension( 'plugin', source: 'invalidurl.com' ), + $this->make_extension( 'plugin', source: 'user/repo' ), + ]; + $themes = [ + $this->make_extension( 'theme', source: 'theme' ), + $this->make_extension( 'theme', source: '123' ), + $this->make_extension( 'theme', source: 'ssh://example.com/theme' ), + ]; $this->expectException( InvalidArgumentException::class ); $this->assertMatchesJsonSnapshot( $this->sut->categorize_extensions( $plugins, $themes, '/tmp/cache/' ) ); } @@ -123,49 +186,86 @@ public function test_empty_arrays() { $this->assertMatchesJsonSnapshot( $this->sut->categorize_extensions( [], [], '/tmp/cache/' ) ); } + /* public function test_non_zip_urls_in_mixed_scenarios() { - $plugins = [ 'http://example.com/plugin', 'https://example.com/plugin.zip' ]; + $plugins = [ + $this->make_extension( 'plugin', source: 'http://example.com/plugin' ), + $this->make_extension( 'plugin', source: 'https://example.com/plugin.zip' ), + ]; $this->expectException( \InvalidArgumentException::class ); $this->sut->categorize_extensions( $plugins, [], '/tmp/cache/' ); } + */ public function test_extensions_with_special_characters() { - $plugins = [ 'special_plugin@1.0', 'another-plugin#version' ]; - $themes = [ 'theme with spaces', 'theme_special*chars' ]; + $plugins = [ + $this->make_extension( 'plugin', source: 'special_plugin@1.0' ), + $this->make_extension( 'plugin', source: 'another-plugin#version' ), + ]; + $themes = [ + $this->make_extension( 'theme', source: 'theme with spaces' ), + $this->make_extension( 'theme', source: 'theme_special*chars' ), + ]; $this->expectException( InvalidArgumentException::class ); $this->expectExceptionMessage( 'The provided string could not be parsed as any of the valid formats: WP.org/Woo.com Slugs, Woo.com product ID, Local path, or Zip URLs.' ); $this->assertMatchesJsonSnapshot( $this->sut->categorize_extensions( $plugins, $themes, '/tmp/cache/' ) ); } public function test_long_extension_names() { - $plugins = [ 'this-is-a-very-long-plugin-name-that-might-exceed-typical-limits' ]; - $themes = [ 'this-is-a-very-long-theme-name-that-might-exceed-typical-limits' ]; + $plugins = [ + $this->make_extension( 'plugin', slug: 'this-is-a-very-long-plugin-name-that-might-exceed-typical-limits' ), + ]; + $themes = [ + $this->make_extension( 'theme', slug: 'this-is-a-very-long-theme-name-that-might-exceed-typical-limits' ), + ]; $this->assertMatchesJsonSnapshot( $this->sut->categorize_extensions( $plugins, $themes, '/tmp/cache/' ) ); } public function test_duplicate_entries() { - $plugins = [ 'duplicate-plugin', 'duplicate-plugin' ]; - $themes = [ 'duplicate-theme', 'duplicate-theme' ]; + $plugins = [ + $this->make_extension( 'plugin', slug: 'duplicate-plugin' ), + $this->make_extension( 'plugin', slug: 'duplicate-plugin' ), + ]; + $themes = [ + $this->make_extension( 'theme', slug: 'duplicate-theme' ), + $this->make_extension( 'theme', slug: 'duplicate-theme' ), + ]; $this->expectException( InvalidArgumentException::class ); $this->expectExceptionMessage( 'Duplicate extension found.' ); $this->assertMatchesJsonSnapshot( $this->sut->categorize_extensions( $plugins, $themes, '/tmp/cache/' ) ); } public function test_extensions_with_dot() { - $plugins = [ 'plugin-v1.2.3', 'plugin-v4.5.6' ]; - $themes = [ 'theme-v7.8.9' ]; + $plugins = [ + $this->make_extension( 'plugin', slug: 'plugin-v1.2.3' ), + $this->make_extension( 'plugin', slug: 'plugin-v4.5.6' ), + ]; + $themes = [ + $this->make_extension( 'theme', slug: 'theme-v7.8.9' ), + ]; $this->assertMatchesJsonSnapshot( $this->sut->categorize_extensions( $plugins, $themes, '/tmp/cache/' ) ); } public function test_mixed_extension_types_in_single_array() { - $plugins = [ '123', 'https://example.com/plugin.zip', '/path/to/plugin', 'user/repository' ]; + $plugins = [ + $this->make_extension( 'plugin', source: '123' ), + $this->make_extension( 'plugin', source: 'https://example.com/plugin.zip' ), + $this->make_extension( 'plugin', source: '/path/to/plugin' ), + $this->make_extension( 'plugin', source: 'user/repository' ), + ]; $this->expectException( \InvalidArgumentException::class ); $this->sut->categorize_extensions( $plugins, [], '/tmp/cache/' ); } public function test_custom_handler() { - $plugins = [ 'foo-custom-1', 'foo-custom-2' ]; - $themes = [ 'foo-custom-theme-1', 'foo-custom-theme-2' ]; + $plugins = [ + $this->make_extension( 'plugin', slug: 'foo-custom-1' ), + $this->make_extension( 'plugin', slug: 'foo-custom-2' ), + ]; + $themes = [ + $this->make_extension( 'theme', slug: 'foo-custom-theme-1' ), + $this->make_extension( 'theme', slug: 'foo-custom-theme-2' ), + ]; $this->assertMatchesJsonSnapshot( $this->sut->categorize_extensions( $plugins, $themes, '/tmp/cache/' ) ); } diff --git a/src/tests/Environment/PluginsAndThemesParserTest.php b/src/tests/Environment/PluginsAndThemesParserTest.php index 06b17723..dc5ecbf7 100644 --- a/src/tests/Environment/PluginsAndThemesParserTest.php +++ b/src/tests/Environment/PluginsAndThemesParserTest.php @@ -2,6 +2,7 @@ use PHPUnit\Framework\TestCase; use QIT_CLI\App; +use QIT_CLI\Environment\Extension; use QIT_CLI\Environment\PluginsAndThemesParser; use Spatie\Snapshots\MatchesSnapshots; use Symfony\Component\Console\Output\NullOutput; @@ -50,7 +51,7 @@ public function test_parse_extensions_array() { "test_tags": ["stable", "{$this->test_tag_local_directory}"], "action": "bootstrap" }, - "cat-pictures": { + "qit-cat": { "source": "https://github.com/cat/pictures", "test_tags": ["beta", "release-candidate"], "action": "test" @@ -67,7 +68,7 @@ public function test_parse_extensions_array() { - stable - "{$this->test_tag_local_directory}" action: bootstrap - cat-pictures: + qit-cat: source: https://github.com/cat/pictures test_tags: - beta @@ -80,7 +81,7 @@ public function test_parse_extensions_array() { $this->assertEquals( $json_array, $yaml_array ); - $this->assertMatchesJsonSnapshot( $this->sut->parse_extensions( $yaml_array['plugins'] ) ); + $this->assertMatchesJsonSnapshot( $this->sut->parse_extensions( $yaml_array['plugins'], Extension::$allowed_types['plugin'] ) ); } public function test_parse_extensions_option() { @@ -97,14 +98,14 @@ public function test_parse_extensions_option() { 'qit-cat:test:rc, feature-foo', 'qit-cat:test:rc, feature-foo, ', '{"slug": "qit-beaver", "source": "https://github.com/qitbeaver/qit-beaver", "test_tags": ["stable", "beta"], "action": "bootstrap"}', - '{"slug": "cat-pictures", "source": "https://github.com/cat/pictures", "action": "test"}', + '{"slug": "qit-cat", "source": "https://github.com/cat/pictures", "action": "test"}', '{"slug": "dog-pictures", "source": "https://github.com/cat/pictures?foo=bar", "action": "bootstrap"}', '{"slug": "dog-pictures", "source": "https://github.com/cat/pictures"}', '{"slug":"qit-beaver","source":"https://github.com/qitbeaver/qit-beaver","test_tags":["stable","' . $this->test_tag_local_zip . '"],"action":"bootstrap"}', ], ]; - $this->assertMatchesJsonSnapshot( $this->sut->parse_extensions( $cli_array['plugins'] ) ); + $this->assertMatchesJsonSnapshot( $this->sut->parse_extensions( $cli_array['plugins'], Extension::$allowed_types['plugin'] ) ); } public function test_parse_extensions_infer() { @@ -131,6 +132,6 @@ public function test_parse_extensions_infer() { ], ]; - $this->assertMatchesJsonSnapshot( $this->sut->parse_extensions( $cli_array['plugins'] ) ); + $this->assertMatchesJsonSnapshot( $this->sut->parse_extensions( $cli_array['plugins'], Extension::$allowed_types['plugin'] ) ); } } \ No newline at end of file diff --git a/src/tests/Environment/__snapshots__/EnvConfigLoaderTest__test_env_config_loader_plugins_array__1.json b/src/tests/Environment/__snapshots__/EnvConfigLoaderTest__test_env_config_loader_plugins_array__1.json index 037099c7..3541daeb 100644 --- a/src/tests/Environment/__snapshots__/EnvConfigLoaderTest__test_env_config_loader_plugins_array__1.json +++ b/src/tests/Environment/__snapshots__/EnvConfigLoaderTest__test_env_config_loader_plugins_array__1.json @@ -10,9 +10,16 @@ "php_extensions": [], "plugins": [ { - "source": "automatewoo", - "slug": "automatewoo", - "test_tag": "bar" + "slug": "qit-beaver", + "source": "qit-beaver", + "downloaded_source": null, + "type": "plugin", + "handler": null, + "version": "undefined", + "action": "install", + "test_tags": [ + "bar" + ] } ], "themes": [], diff --git a/src/tests/Environment/__snapshots__/EnvConfigLoaderTest__test_env_config_loader_plugins_mixed__1.json b/src/tests/Environment/__snapshots__/EnvConfigLoaderTest__test_env_config_loader_plugins_mixed__1.json index 5ea2e78a..e4263aaa 100644 --- a/src/tests/Environment/__snapshots__/EnvConfigLoaderTest__test_env_config_loader_plugins_mixed__1.json +++ b/src/tests/Environment/__snapshots__/EnvConfigLoaderTest__test_env_config_loader_plugins_mixed__1.json @@ -10,26 +10,54 @@ "php_extensions": [], "plugins": [ { - "source": "automatewoo_birthdays", - "slug": "automatewoo_birthdays", - "test_tag": "bar" + "slug": "qit-cat", + "source": "qit-cat", + "downloaded_source": null, + "type": "plugin", + "handler": null, + "version": "undefined", + "action": "install", + "test_tags": [ + "bar" + ] }, { - "source": "automatewoo", - "slug": "automatewoo", - "test_tag": "none" + "slug": "qit-beaver", + "source": "qit-beaver", + "downloaded_source": null, + "type": "plugin", + "handler": null, + "version": "undefined", + "action": "install", + "test_tags": [ + "default" + ] } ], "themes": [ { - "source": "twentytwenty", - "slug": "twentytwenty", - "test_tag": "none" + "slug": "qit-dog", + "source": "qit-dog", + "downloaded_source": null, + "type": "theme", + "handler": null, + "version": "undefined", + "action": "install", + "test_tags": [ + "default" + ] }, { - "source": "twentytwentyone", - "slug": "twentytwentyone", - "test_tag": "foo" + "slug": "foo-extension", + "source": "foo-extension", + "downloaded_source": null, + "type": "theme", + "handler": null, + "version": "undefined", + "action": "install", + "test_tags": [ + "foo" + ] } ], "site_url": null, diff --git a/src/tests/Environment/__snapshots__/EnvConfigLoaderTest__test_env_config_loader_plugins_override__1.json b/src/tests/Environment/__snapshots__/EnvConfigLoaderTest__test_env_config_loader_plugins_override__1.json index 5a024da7..9fa6f7d7 100644 --- a/src/tests/Environment/__snapshots__/EnvConfigLoaderTest__test_env_config_loader_plugins_override__1.json +++ b/src/tests/Environment/__snapshots__/EnvConfigLoaderTest__test_env_config_loader_plugins_override__1.json @@ -10,38 +10,54 @@ "php_extensions": [], "plugins": [ { - "source": "automatewoo_birthdays", - "test_tag": "untrimed_override" + "slug": "qit-beaver", + "source": "C:\\Users\\user\\Desktop\\qit-beaver", + "downloaded_source": null, + "type": "plugin", + "handler": null, + "version": "undefined", + "action": "install", + "test_tags": [ + "default" + ] }, { - "source": "automatewoo", - "test_tag": "array_override" + "slug": "qit-dog", + "source": "https:\/\/woo.com\/qit-dog", + "downloaded_source": null, + "type": "plugin", + "handler": null, + "version": "undefined", + "action": "install", + "test_tags": [ + "bar" + ] }, { - "source": "https:\/\/woo.com\/automatewoo-referrals", - "test_tag": "bar" - }, - { - "source": "https:\/\/woo.com\/automatewoo-url", - "test_tag": "none" - }, - { - "source": "https:\/\/woo.com\/automatewoo-url-array", - "test_tag": "test_tag_array" - }, - { - "source": "C:\\Users\\user\\Desktop\\automatewoo-url-windows", - "test_tag": "none" - }, - { - "source": "C:\\Users\\user\\Desktop\\automatewoo-url-windows", - "test_tag": "baz" + "slug": "foo-extension", + "source": "https:\/\/woo.com\/foo-extension", + "downloaded_source": null, + "type": "plugin", + "handler": null, + "version": "undefined", + "action": "install", + "test_tags": [ + "test_tag_array" + ] } ], "themes": [ { - "source": "twentytwentyone", - "test_tag": "string_override" + "slug": "qit-beaver", + "source": "qit-beaver", + "downloaded_source": null, + "type": "theme", + "handler": null, + "version": "undefined", + "action": "test", + "test_tags": [ + "default" + ] } ], "site_url": null, diff --git a/src/tests/Environment/__snapshots__/EnvConfigLoaderTest__test_env_config_loader_plugins_string__1.json b/src/tests/Environment/__snapshots__/EnvConfigLoaderTest__test_env_config_loader_plugins_string__1.json index c0c85ea3..1c6b9010 100644 --- a/src/tests/Environment/__snapshots__/EnvConfigLoaderTest__test_env_config_loader_plugins_string__1.json +++ b/src/tests/Environment/__snapshots__/EnvConfigLoaderTest__test_env_config_loader_plugins_string__1.json @@ -10,9 +10,16 @@ "php_extensions": [], "plugins": [ { - "source": "automatewoo", - "slug": "automatewoo", - "test_tag": "none" + "slug": "qit-beaver", + "source": "qit-beaver", + "downloaded_source": null, + "type": "plugin", + "handler": null, + "version": "undefined", + "action": "install", + "test_tags": [ + "default" + ] } ], "themes": [], diff --git a/src/tests/Environment/__snapshots__/EnvConfigLoaderTest__test_env_config_loader_plugins_url_with_source__1.json b/src/tests/Environment/__snapshots__/EnvConfigLoaderTest__test_env_config_loader_plugins_url_with_source__1.json index 9cc22d19..45ad6e9a 100644 --- a/src/tests/Environment/__snapshots__/EnvConfigLoaderTest__test_env_config_loader_plugins_url_with_source__1.json +++ b/src/tests/Environment/__snapshots__/EnvConfigLoaderTest__test_env_config_loader_plugins_url_with_source__1.json @@ -10,9 +10,16 @@ "php_extensions": [], "plugins": [ { - "source": "https:\/\/woo.com\/automatewoo-url", - "slug": "automatewoo", - "test_tag": "none" + "slug": "qit-beaver", + "source": "https:\/\/woo.com\/qit-beaver", + "downloaded_source": null, + "type": "plugin", + "handler": null, + "version": "undefined", + "action": "install", + "test_tags": [ + "default" + ] } ], "themes": [], diff --git a/src/tests/Environment/__snapshots__/EnvConfigLoaderTest__test_env_config_loader_plugins_url_with_source_and_tags__1.json b/src/tests/Environment/__snapshots__/EnvConfigLoaderTest__test_env_config_loader_plugins_url_with_source_and_tags__1.json index 13d35e95..97eb060b 100644 --- a/src/tests/Environment/__snapshots__/EnvConfigLoaderTest__test_env_config_loader_plugins_url_with_source_and_tags__1.json +++ b/src/tests/Environment/__snapshots__/EnvConfigLoaderTest__test_env_config_loader_plugins_url_with_source_and_tags__1.json @@ -10,9 +10,16 @@ "php_extensions": [], "plugins": [ { - "source": "https:\/\/woo.com\/automatewoo-url", - "slug": "automatewoo", - "test_tag": "rc" + "slug": "qit-beaver", + "source": "https:\/\/woo.com\/qit-beaver", + "downloaded_source": null, + "type": "plugin", + "handler": null, + "version": "undefined", + "action": "install", + "test_tags": [ + "rc" + ] } ], "themes": [], diff --git a/src/tests/Environment/__snapshots__/EnvConfigLoaderTest__test_env_config_loader_plugins_url_with_source_and_tags_json__1.json b/src/tests/Environment/__snapshots__/EnvConfigLoaderTest__test_env_config_loader_plugins_url_with_source_and_tags_json__1.json index 13d35e95..97eb060b 100644 --- a/src/tests/Environment/__snapshots__/EnvConfigLoaderTest__test_env_config_loader_plugins_url_with_source_and_tags_json__1.json +++ b/src/tests/Environment/__snapshots__/EnvConfigLoaderTest__test_env_config_loader_plugins_url_with_source_and_tags_json__1.json @@ -10,9 +10,16 @@ "php_extensions": [], "plugins": [ { - "source": "https:\/\/woo.com\/automatewoo-url", - "slug": "automatewoo", - "test_tag": "rc" + "slug": "qit-beaver", + "source": "https:\/\/woo.com\/qit-beaver", + "downloaded_source": null, + "type": "plugin", + "handler": null, + "version": "undefined", + "action": "install", + "test_tags": [ + "rc" + ] } ], "themes": [], diff --git a/src/tests/Environment/__snapshots__/EnvConfigLoaderTest__test_env_config_loader_plugins_url_with_source_json__1.json b/src/tests/Environment/__snapshots__/EnvConfigLoaderTest__test_env_config_loader_plugins_url_with_source_json__1.json index 9cc22d19..45ad6e9a 100644 --- a/src/tests/Environment/__snapshots__/EnvConfigLoaderTest__test_env_config_loader_plugins_url_with_source_json__1.json +++ b/src/tests/Environment/__snapshots__/EnvConfigLoaderTest__test_env_config_loader_plugins_url_with_source_json__1.json @@ -10,9 +10,16 @@ "php_extensions": [], "plugins": [ { - "source": "https:\/\/woo.com\/automatewoo-url", - "slug": "automatewoo", - "test_tag": "none" + "slug": "qit-beaver", + "source": "https:\/\/woo.com\/qit-beaver", + "downloaded_source": null, + "type": "plugin", + "handler": null, + "version": "undefined", + "action": "install", + "test_tags": [ + "default" + ] } ], "themes": [], diff --git a/src/tests/Environment/__snapshots__/ExtensionDownloaderTest__test_categorize_extensions__1.json b/src/tests/Environment/__snapshots__/ExtensionDownloaderTest__test_categorize_extensions__1.json index 8e613ae5..fdac3ad1 100644 --- a/src/tests/Environment/__snapshots__/ExtensionDownloaderTest__test_categorize_extensions__1.json +++ b/src/tests/Environment/__snapshots__/ExtensionDownloaderTest__test_categorize_extensions__1.json @@ -1,34 +1,42 @@ { "plugin1": { - "extension_identifier": "plugin1", + "slug": "plugin1", + "source": "plugin1", + "downloaded_source": null, "type": "plugin", "handler": "QIT_CLI\\Environment\\ExtensionDownload\\Handlers\\QITHandler", - "path": "", "version": "undefined", - "download_url": null + "action": null, + "test_tags": null }, "plugin2": { - "extension_identifier": "plugin2", + "slug": "plugin2", + "source": "plugin2", + "downloaded_source": null, "type": "plugin", "handler": "QIT_CLI\\Environment\\ExtensionDownload\\Handlers\\QITHandler", - "path": "", "version": "undefined", - "download_url": null + "action": null, + "test_tags": null }, "theme1": { - "extension_identifier": "theme1", + "slug": "theme1", + "source": "theme1", + "downloaded_source": null, "type": "theme", "handler": "QIT_CLI\\Environment\\ExtensionDownload\\Handlers\\QITHandler", - "path": "", "version": "undefined", - "download_url": null + "action": null, + "test_tags": null }, "theme2": { - "extension_identifier": "theme2", + "slug": "theme2", + "source": "theme2", + "downloaded_source": null, "type": "theme", "handler": "QIT_CLI\\Environment\\ExtensionDownload\\Handlers\\QITHandler", - "path": "", "version": "undefined", - "download_url": null + "action": null, + "test_tags": null } } diff --git a/src/tests/Environment/__snapshots__/ExtensionDownloaderTest__test_custom_handler__1.json b/src/tests/Environment/__snapshots__/ExtensionDownloaderTest__test_custom_handler__1.json index 6f24bdc9..a3610cd2 100644 --- a/src/tests/Environment/__snapshots__/ExtensionDownloaderTest__test_custom_handler__1.json +++ b/src/tests/Environment/__snapshots__/ExtensionDownloaderTest__test_custom_handler__1.json @@ -1,34 +1,42 @@ { "foo-custom-1": { - "extension_identifier": "foo-custom-1", + "slug": "foo-custom-1", + "source": "foo-custom-1", + "downloaded_source": null, "type": "plugin", "handler": "FooCustomHandler", - "path": "", "version": "undefined", - "download_url": null + "action": null, + "test_tags": null }, "foo-custom-2": { - "extension_identifier": "foo-custom-2", + "slug": "foo-custom-2", + "source": "foo-custom-2", + "downloaded_source": null, "type": "plugin", "handler": "FooCustomHandler", - "path": "", "version": "undefined", - "download_url": null + "action": null, + "test_tags": null }, "foo-custom-theme-1": { - "extension_identifier": "foo-custom-theme-1", + "slug": "foo-custom-theme-1", + "source": "foo-custom-theme-1", + "downloaded_source": null, "type": "theme", "handler": "FooCustomHandler", - "path": "", "version": "undefined", - "download_url": null + "action": null, + "test_tags": null }, "foo-custom-theme-2": { - "extension_identifier": "foo-custom-theme-2", + "slug": "foo-custom-theme-2", + "source": "foo-custom-theme-2", + "downloaded_source": null, "type": "theme", "handler": "FooCustomHandler", - "path": "", "version": "undefined", - "download_url": null + "action": null, + "test_tags": null } } diff --git a/src/tests/Environment/__snapshots__/ExtensionDownloaderTest__test_extensions_with_dot__1.json b/src/tests/Environment/__snapshots__/ExtensionDownloaderTest__test_extensions_with_dot__1.json index 41504802..e437c1a9 100644 --- a/src/tests/Environment/__snapshots__/ExtensionDownloaderTest__test_extensions_with_dot__1.json +++ b/src/tests/Environment/__snapshots__/ExtensionDownloaderTest__test_extensions_with_dot__1.json @@ -1,26 +1,32 @@ { "plugin-v1.2.3": { - "extension_identifier": "plugin-v1.2.3", + "slug": "plugin-v1.2.3", + "source": "plugin-v1.2.3", + "downloaded_source": null, "type": "plugin", "handler": "QIT_CLI\\Environment\\ExtensionDownload\\Handlers\\QITHandler", - "path": "", "version": "undefined", - "download_url": null + "action": null, + "test_tags": null }, "plugin-v4.5.6": { - "extension_identifier": "plugin-v4.5.6", + "slug": "plugin-v4.5.6", + "source": "plugin-v4.5.6", + "downloaded_source": null, "type": "plugin", "handler": "QIT_CLI\\Environment\\ExtensionDownload\\Handlers\\QITHandler", - "path": "", "version": "undefined", - "download_url": null + "action": null, + "test_tags": null }, "theme-v7.8.9": { - "extension_identifier": "theme-v7.8.9", + "slug": "theme-v7.8.9", + "source": "theme-v7.8.9", + "downloaded_source": null, "type": "theme", "handler": "QIT_CLI\\Environment\\ExtensionDownload\\Handlers\\QITHandler", - "path": "", "version": "undefined", - "download_url": null + "action": null, + "test_tags": null } } diff --git a/src/tests/Environment/__snapshots__/ExtensionDownloaderTest__test_file_path_extensions__1.json b/src/tests/Environment/__snapshots__/ExtensionDownloaderTest__test_file_path_extensions__1.json index e761aab5..2fe6df3d 100644 --- a/src/tests/Environment/__snapshots__/ExtensionDownloaderTest__test_file_path_extensions__1.json +++ b/src/tests/Environment/__snapshots__/ExtensionDownloaderTest__test_file_path_extensions__1.json @@ -1,34 +1,42 @@ { - "\/tmp\/plugin": { - "extension_identifier": "plugin", + "b1e11c1fb5a6645067d2725427d8ee70": { + "slug": "b1e11c1fb5a6645067d2725427d8ee70", + "source": "\/tmp\/plugin", + "downloaded_source": null, "type": "plugin", "handler": "QIT_CLI\\Environment\\ExtensionDownload\\Handlers\\FileHandler", - "path": "\/tmp\/plugin", "version": "undefined", - "download_url": null + "action": null, + "test_tags": null }, - "\/tmp\/plugin2.zip": { - "extension_identifier": "plugin2", + "9629d5fe1854eae2a590ec1923c54d87": { + "slug": "9629d5fe1854eae2a590ec1923c54d87", + "source": "\/tmp\/plugin2.zip", + "downloaded_source": null, "type": "plugin", "handler": "QIT_CLI\\Environment\\ExtensionDownload\\Handlers\\FileHandler", - "path": "\/tmp\/plugin2.zip", "version": "undefined", - "download_url": null + "action": null, + "test_tags": null }, - "\/tmp\/theme": { - "extension_identifier": "theme", + "77ee9bc47105a874f85e814cf072729d": { + "slug": "77ee9bc47105a874f85e814cf072729d", + "source": "\/tmp\/theme", + "downloaded_source": null, "type": "theme", "handler": "QIT_CLI\\Environment\\ExtensionDownload\\Handlers\\FileHandler", - "path": "\/tmp\/theme", "version": "undefined", - "download_url": null + "action": null, + "test_tags": null }, - "\/tmp\/theme2.zip": { - "extension_identifier": "theme2", + "36d755f331b385dbd16b552001f819fb": { + "slug": "36d755f331b385dbd16b552001f819fb", + "source": "\/tmp\/theme2.zip", + "downloaded_source": null, "type": "theme", "handler": "QIT_CLI\\Environment\\ExtensionDownload\\Handlers\\FileHandler", - "path": "\/tmp\/theme2.zip", "version": "undefined", - "download_url": null + "action": null, + "test_tags": null } } diff --git a/src/tests/Environment/__snapshots__/ExtensionDownloaderTest__test_long_extension_names__1.json b/src/tests/Environment/__snapshots__/ExtensionDownloaderTest__test_long_extension_names__1.json index 1ed8d67c..bc7cb0c9 100644 --- a/src/tests/Environment/__snapshots__/ExtensionDownloaderTest__test_long_extension_names__1.json +++ b/src/tests/Environment/__snapshots__/ExtensionDownloaderTest__test_long_extension_names__1.json @@ -1,18 +1,22 @@ { "this-is-a-very-long-plugin-name-that-might-exceed-typical-limits": { - "extension_identifier": "this-is-a-very-long-plugin-name-that-might-exceed-typical-limits", + "slug": "this-is-a-very-long-plugin-name-that-might-exceed-typical-limits", + "source": "this-is-a-very-long-plugin-name-that-might-exceed-typical-limits", + "downloaded_source": null, "type": "plugin", "handler": "QIT_CLI\\Environment\\ExtensionDownload\\Handlers\\QITHandler", - "path": "", "version": "undefined", - "download_url": null + "action": null, + "test_tags": null }, "this-is-a-very-long-theme-name-that-might-exceed-typical-limits": { - "extension_identifier": "this-is-a-very-long-theme-name-that-might-exceed-typical-limits", + "slug": "this-is-a-very-long-theme-name-that-might-exceed-typical-limits", + "source": "this-is-a-very-long-theme-name-that-might-exceed-typical-limits", + "downloaded_source": null, "type": "theme", "handler": "QIT_CLI\\Environment\\ExtensionDownload\\Handlers\\QITHandler", - "path": "", "version": "undefined", - "download_url": null + "action": null, + "test_tags": null } } diff --git a/src/tests/Environment/__snapshots__/ExtensionDownloaderTest__test_numeric_extensions__1.json b/src/tests/Environment/__snapshots__/ExtensionDownloaderTest__test_numeric_extensions__1.json index 48ad2cc3..511327f3 100644 --- a/src/tests/Environment/__snapshots__/ExtensionDownloaderTest__test_numeric_extensions__1.json +++ b/src/tests/Environment/__snapshots__/ExtensionDownloaderTest__test_numeric_extensions__1.json @@ -1,26 +1,32 @@ { - "123": { - "extension_identifier": "123", + "plugin1": { + "slug": "plugin1", + "source": "123", + "downloaded_source": null, "type": "plugin", "handler": "QIT_CLI\\Environment\\ExtensionDownload\\Handlers\\QITHandler", - "path": "", "version": "undefined", - "download_url": null + "action": null, + "test_tags": null }, - "456": { - "extension_identifier": "456", + "plugin2": { + "slug": "plugin2", + "source": "456", + "downloaded_source": null, "type": "plugin", "handler": "QIT_CLI\\Environment\\ExtensionDownload\\Handlers\\QITHandler", - "path": "", "version": "undefined", - "download_url": null + "action": null, + "test_tags": null }, - "789": { - "extension_identifier": "789", + "theme1": { + "slug": "theme1", + "source": "789", + "downloaded_source": null, "type": "theme", "handler": "QIT_CLI\\Environment\\ExtensionDownload\\Handlers\\QITHandler", - "path": "", "version": "undefined", - "download_url": null + "action": null, + "test_tags": null } } diff --git a/src/tests/Environment/__snapshots__/ExtensionDownloaderTest__test_valid_ur_extensions__1.json b/src/tests/Environment/__snapshots__/ExtensionDownloaderTest__test_valid_ur_extensions__1.json index 74d50863..42196858 100644 --- a/src/tests/Environment/__snapshots__/ExtensionDownloaderTest__test_valid_ur_extensions__1.json +++ b/src/tests/Environment/__snapshots__/ExtensionDownloaderTest__test_valid_ur_extensions__1.json @@ -1,18 +1,22 @@ { - "http:\/\/example.com\/plugin.zip": { - "extension_identifier": "1a0542ad87fe4c3f2b949ff7fcebdd02", + "1a0542ad87fe4c3f2b949ff7fcebdd02": { + "slug": "1a0542ad87fe4c3f2b949ff7fcebdd02", + "source": "http:\/\/example.com\/plugin.zip", + "downloaded_source": null, "type": "plugin", "handler": "QIT_CLI\\Environment\\ExtensionDownload\\Handlers\\URLHandler", - "path": "", "version": "undefined", - "download_url": "http:\/\/example.com\/plugin.zip" + "action": null, + "test_tags": null }, - "https:\/\/example.com\/plugin2.zip": { - "extension_identifier": "414dd101454aa1fdae474005c0824121", + "414dd101454aa1fdae474005c0824121": { + "slug": "414dd101454aa1fdae474005c0824121", + "source": "https:\/\/example.com\/plugin2.zip", + "downloaded_source": null, "type": "plugin", "handler": "QIT_CLI\\Environment\\ExtensionDownload\\Handlers\\URLHandler", - "path": "", "version": "undefined", - "download_url": "https:\/\/example.com\/plugin2.zip" + "action": null, + "test_tags": null } } diff --git a/src/tests/Environment/__snapshots__/PluginsAndThemesParserTest__test_parse_extensions_array__1.json b/src/tests/Environment/__snapshots__/PluginsAndThemesParserTest__test_parse_extensions_array__1.json index 83944e83..d6ad52ac 100644 --- a/src/tests/Environment/__snapshots__/PluginsAndThemesParserTest__test_parse_extensions_array__1.json +++ b/src/tests/Environment/__snapshots__/PluginsAndThemesParserTest__test_parse_extensions_array__1.json @@ -1,17 +1,25 @@ [ { - "action": "bootstrap", "slug": "qit-beaver", "source": "https:\/\/github.com\/qitbeaver\/qit-beaver", + "downloaded_source": null, + "type": "plugin", + "handler": null, + "version": "undefined", + "action": "bootstrap", "test_tags": [ "stable", "\/tmp\/test-tag-local-dir" ] }, { - "action": "test", - "slug": "cat-pictures", + "slug": "qit-cat", "source": "https:\/\/github.com\/cat\/pictures", + "downloaded_source": null, + "type": "plugin", + "handler": null, + "version": "undefined", + "action": "test", "test_tags": [ "beta", "release-candidate" diff --git a/src/tests/Environment/__snapshots__/PluginsAndThemesParserTest__test_parse_extensions_infer__1.json b/src/tests/Environment/__snapshots__/PluginsAndThemesParserTest__test_parse_extensions_infer__1.json index 99fe5272..cdead8fd 100644 --- a/src/tests/Environment/__snapshots__/PluginsAndThemesParserTest__test_parse_extensions_infer__1.json +++ b/src/tests/Environment/__snapshots__/PluginsAndThemesParserTest__test_parse_extensions_infer__1.json @@ -1,152 +1,61 @@ [ { - "action": "install", "slug": "qit-beaver", - "source": "qit-beaver", + "source": "\\\\network-share\\plugins\\qit-beaver.zip", + "downloaded_source": null, + "type": "plugin", + "handler": null, + "version": "undefined", + "action": "install", "test_tags": [ "default" ] }, { - "action": "test", "slug": "qit-cat", "source": "qit-cat", - "test_tags": [ - "rc" - ] - }, - { + "downloaded_source": null, + "type": "plugin", + "handler": null, + "version": "undefined", "action": "test", - "slug": "qit-cat", - "source": "qit-cat", - "test_tags": [ - "rc", - "feature-foo" - ] - }, - { - "action": "test", - "slug": "qit-cat", - "source": "qit-cat", - "test_tags": [ - "rc", - "feature-foo" - ] - }, - { - "action": "test", - "slug": "qit-cat", - "source": "qit-cat", - "test_tags": [ - "rc", - "feature-foo" - ] - }, - { - "action": "test", - "slug": "qit-cat", - "source": "qit-cat", "test_tags": [ "rc", "\/tmp\/test-tag-local-zip.zip" ] }, { - "action": "test", - "slug": "foo-extension", - "source": "https:\/\/github.com\/qitbeaver\/foo-extension.zip", - "test_tags": [ - "rc", - "feature-foo" - ] - }, - { - "action": "test", "slug": "foo-extension", "source": "https:\/\/github.com\/qitbeaver\/foo-extension.zip", - "test_tags": [ - "\/tmp\/test-tag-local-dir", - "foobarbaz" - ] - }, - { - "action": "test", - "slug": "bar-extension", - "source": "\/path\/to\/file\/bar-extension.zip", - "test_tags": [ - "rc", - "feature-foo" - ] - }, - { - "action": "test", - "slug": "baz-extension", - "source": "\/path\/to\/file\/baz-extension", - "test_tags": [ - "rc", - "feature-foo" - ] - }, - { + "downloaded_source": null, + "type": "plugin", + "handler": null, + "version": "undefined", "action": "install", - "slug": "bar-extension", - "source": "\/path\/to\/file\/bar-extension.zip", "test_tags": [ "default" ] }, { - "action": "install", - "slug": "qit-beaver", - "source": "C:\\Program Files\\example\\qit-beaver.zip", - "test_tags": [ - "default" - ] - }, - { - "action": "install", - "slug": "qit-beaver", - "source": "ftp:\/\/ftp.example.com\/qit-beaver.zip", - "test_tags": [ - "default" - ] - }, - { - "action": "install", - "slug": "qit-beaver", - "source": "ssh:\/\/example.com:\/path\/to\/qit-beaver.zip", - "test_tags": [ - "default" - ] - }, - { - "action": "install", - "slug": "qit-beaver", - "source": "\\\\network-share\\plugins\\qit-beaver.zip", - "test_tags": [ - "default" - ] - }, - { - "action": "install", - "slug": "foo-extension", - "source": "https:\/\/github.com\/qitbeaver\/foo-extension.zip", - "test_tags": [ - "default" - ] - }, - { - "action": "install", "slug": "bar-extension", "source": "\/path\/to\/file\/bar-extension.zip", + "downloaded_source": null, + "type": "plugin", + "handler": null, + "version": "undefined", + "action": "install", "test_tags": [ "default" ] }, { - "action": "install", "slug": "baz-extension", "source": "\/path\/to\/file\/baz-extension", + "downloaded_source": null, + "type": "plugin", + "handler": null, + "version": "undefined", + "action": "install", "test_tags": [ "default" ] diff --git a/src/tests/Environment/__snapshots__/PluginsAndThemesParserTest__test_parse_extensions_option__1.json b/src/tests/Environment/__snapshots__/PluginsAndThemesParserTest__test_parse_extensions_option__1.json index cb1db001..237a7aaa 100644 --- a/src/tests/Environment/__snapshots__/PluginsAndThemesParserTest__test_parse_extensions_option__1.json +++ b/src/tests/Environment/__snapshots__/PluginsAndThemesParserTest__test_parse_extensions_option__1.json @@ -1,87 +1,39 @@ [ { - "action": "install", - "slug": "qit-beaver", - "source": "qit-beaver", - "test_tags": [ - "default" - ] - }, - { - "action": "test", - "slug": "qit-cat", - "source": "qit-cat", - "test_tags": [ - "rc" - ] - }, - { - "action": "test", - "slug": "qit-cat", - "source": "qit-cat", - "test_tags": [ - "rc", - "feature-foo" - ] - }, - { - "action": "test", - "slug": "qit-cat", - "source": "qit-cat", - "test_tags": [ - "rc", - "feature-foo" - ] - }, - { - "action": "test", - "slug": "qit-cat", - "source": "qit-cat", - "test_tags": [ - "rc", - "feature-foo" - ] - }, - { - "action": "bootstrap", "slug": "qit-beaver", "source": "https:\/\/github.com\/qitbeaver\/qit-beaver", + "downloaded_source": null, + "type": "plugin", + "handler": null, + "version": "undefined", + "action": "bootstrap", "test_tags": [ "stable", - "beta" + "\/tmp\/test-tag-local-zip.zip" ] }, { - "action": "test", - "slug": "cat-pictures", + "slug": "qit-cat", "source": "https:\/\/github.com\/cat\/pictures", + "downloaded_source": null, + "type": "plugin", + "handler": null, + "version": "undefined", + "action": "test", "test_tags": [ "default" ] }, { - "action": "bootstrap", - "slug": "dog-pictures", - "source": "https:\/\/github.com\/cat\/pictures?foo=bar", - "test_tags": [ - "default" - ] - }, - { - "action": "install", "slug": "dog-pictures", "source": "https:\/\/github.com\/cat\/pictures", + "downloaded_source": null, + "type": "plugin", + "handler": null, + "version": "undefined", + "action": "install", "test_tags": [ "default" ] - }, - { - "action": "bootstrap", - "slug": "qit-beaver", - "source": "https:\/\/github.com\/qitbeaver\/qit-beaver", - "test_tags": [ - "stable", - "\/tmp\/test-tag-local-zip.zip" - ] } ] diff --git a/src/tests/__snapshots__/PartnerManagementTest__test_add_partner__1.json b/src/tests/__snapshots__/PartnerManagementTest__test_add_partner__1.json index a1c7369a..56d07289 100644 --- a/src/tests/__snapshots__/PartnerManagementTest__test_add_partner__1.json +++ b/src/tests/__snapshots__/PartnerManagementTest__test_add_partner__1.json @@ -1147,6 +1147,18 @@ { "id": 789, "slug": "baz-extension" + }, + { + "id": 1234, + "slug": "qit-beaver" + }, + { + "id": 12345, + "slug": "qit-cat" + }, + { + "id": 12345, + "slug": "qit-dog" } ], "environments": { diff --git a/src/tests/__snapshots__/PartnerManagementTest__test_add_partner_email__1.json b/src/tests/__snapshots__/PartnerManagementTest__test_add_partner_email__1.json index 204a1551..d2673707 100644 --- a/src/tests/__snapshots__/PartnerManagementTest__test_add_partner_email__1.json +++ b/src/tests/__snapshots__/PartnerManagementTest__test_add_partner_email__1.json @@ -1147,6 +1147,18 @@ { "id": 789, "slug": "baz-extension" + }, + { + "id": 1234, + "slug": "qit-beaver" + }, + { + "id": 12345, + "slug": "qit-cat" + }, + { + "id": 12345, + "slug": "qit-dog" } ], "environments": { diff --git a/src/tests/__snapshots__/PartnerManagementTest__test_switch_partner__1.json b/src/tests/__snapshots__/PartnerManagementTest__test_switch_partner__1.json index 15de7015..ef626d4b 100644 --- a/src/tests/__snapshots__/PartnerManagementTest__test_switch_partner__1.json +++ b/src/tests/__snapshots__/PartnerManagementTest__test_switch_partner__1.json @@ -1147,6 +1147,18 @@ { "id": 789, "slug": "baz-extension" + }, + { + "id": 1234, + "slug": "qit-beaver" + }, + { + "id": 12345, + "slug": "qit-cat" + }, + { + "id": 12345, + "slug": "qit-dog" } ], "environments": { diff --git a/src/tests/__snapshots__/PartnerManagementTest__test_switch_partner__2.json b/src/tests/__snapshots__/PartnerManagementTest__test_switch_partner__2.json index a1c7369a..56d07289 100644 --- a/src/tests/__snapshots__/PartnerManagementTest__test_switch_partner__2.json +++ b/src/tests/__snapshots__/PartnerManagementTest__test_switch_partner__2.json @@ -1147,6 +1147,18 @@ { "id": 789, "slug": "baz-extension" + }, + { + "id": 1234, + "slug": "qit-beaver" + }, + { + "id": 12345, + "slug": "qit-cat" + }, + { + "id": 12345, + "slug": "qit-dog" } ], "environments": { diff --git a/src/tests/__snapshots__/PartnerManagementTest__test_switch_partner_on_different_environments__1.json b/src/tests/__snapshots__/PartnerManagementTest__test_switch_partner_on_different_environments__1.json index b5c3f7a2..71007b37 100644 --- a/src/tests/__snapshots__/PartnerManagementTest__test_switch_partner_on_different_environments__1.json +++ b/src/tests/__snapshots__/PartnerManagementTest__test_switch_partner_on_different_environments__1.json @@ -1147,6 +1147,18 @@ { "id": 789, "slug": "baz-extension" + }, + { + "id": 1234, + "slug": "qit-beaver" + }, + { + "id": 12345, + "slug": "qit-cat" + }, + { + "id": 12345, + "slug": "qit-dog" } ], "environments": { diff --git a/src/tests/__snapshots__/PartnerManagementTest__test_switch_partner_on_different_environments__2.json b/src/tests/__snapshots__/PartnerManagementTest__test_switch_partner_on_different_environments__2.json index 1c4b77c1..8e7d8607 100644 --- a/src/tests/__snapshots__/PartnerManagementTest__test_switch_partner_on_different_environments__2.json +++ b/src/tests/__snapshots__/PartnerManagementTest__test_switch_partner_on_different_environments__2.json @@ -1147,6 +1147,18 @@ { "id": 789, "slug": "baz-extension" + }, + { + "id": 1234, + "slug": "qit-beaver" + }, + { + "id": 12345, + "slug": "qit-cat" + }, + { + "id": 12345, + "slug": "qit-dog" } ], "environments": {