X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fsystem%2Ftests%2Fsrc%2FKernel%2FPlugin%2Fmigrate%2Fsource%2FExtensionTest.php;fp=web%2Fcore%2Fmodules%2Fsystem%2Ftests%2Fsrc%2FKernel%2FPlugin%2Fmigrate%2Fsource%2FExtensionTest.php;h=c6576019a760d57080b28f32db5c045ac3fc8c5b;hp=0000000000000000000000000000000000000000;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c diff --git a/web/core/modules/system/tests/src/Kernel/Plugin/migrate/source/ExtensionTest.php b/web/core/modules/system/tests/src/Kernel/Plugin/migrate/source/ExtensionTest.php new file mode 100644 index 000000000..c6576019a --- /dev/null +++ b/web/core/modules/system/tests/src/Kernel/Plugin/migrate/source/ExtensionTest.php @@ -0,0 +1,77 @@ + 'sites/all/modules/i18n/i18nmenu/i18nmenu.module', + 'name' => 'i18nmenu', + 'type' => 'module', + 'owner' => '', + 'status' => '1', + 'throttle' => '0', + 'bootstrap' => '0', + 'schema_version' => '0', + 'weight' => '0', + 'info' => 'a:10:{s:4:"name";s:16:"Menu translation";s:11:"description";s:40:"Supports translatable custom menu items.";s:12:"dependencies";a:4:{i:0;s:4:"i18n";i:1;s:4:"menu";i:2;s:10:"i18nblocks";i:3;s:11:"i18nstrings";}s:7:"package";s:13:"Multilanguage";s:4:"core";s:3:"6.x";s:7:"version";s:8:"6.x-1.10";s:7:"project";s:4:"i18n";s:9:"datestamp";s:10:"1318336004";s:10:"dependents";a:0:{}s:3:"php";s:5:"4.3.5";},', + ], + [ + 'filename' => 'sites/all/modules/variable/variable.module ', + 'name' => 'variable', + 'type' => 'module', + 'owner' => '', + 'status' => '1', + 'throttle' => '0', + 'bootstrap' => '0', + 'schema_version' => '-1', + 'weight' => '0', + 'info' => 'a:9:{s:4:"name";s:12:"Variable API";s:11:"description";s:12:"Variable API";s:4:"core";s:3:"6.x";s:7:"version";s:14:"6.x-1.0-alpha1";s:7:"project";s:8:"variable";s:9:"datestamp";s:10:"1414059742";s:12:"dependencies";a:0:{}s:10:"dependents";a:0:{}s:3:"php";s:5:"4.3.5";}', + ], + ]; + + $info = unserialize('a:9:{s:4:"name";s:12:"Variable API";s:11:"description";s:12:"Variable API";s:4:"core";s:3:"6.x";s:7:"version";s:14:"6.x-1.0-alpha1";s:7:"project";s:8:"variable";s:9:"datestamp";s:10:"1414059742";s:12:"dependencies";a:0:{}s:10:"dependents";a:0:{}s:3:"php";s:5:"4.3.5";}'); + $test[0]['expected_results'] = [ + [ + 'filename' => 'sites/all/modules/variable/variable.module ', + 'name' => 'variable', + 'type' => 'module', + 'owner' => '', + 'status' => '1', + 'throttle' => '0', + 'bootstrap' => '0', + 'schema_version' => '-1', + 'weight' => '0', + 'info' => $info, + ], + ]; + + $test[0]['expected_count'] = NULL; + $test[0]['configuration'] = [ + 'name' => 'variable', + ]; + + return $test; + } + +}