X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=web%2Fcore%2Fmodules%2Fbook%2Ftests%2Fsrc%2FKernel%2FPlugin%2Fmigrate%2Fsource%2Fd6%2FBookTest.php;fp=web%2Fcore%2Fmodules%2Fbook%2Ftests%2Fsrc%2FKernel%2FPlugin%2Fmigrate%2Fsource%2Fd6%2FBookTest.php;h=feece1f7bcf032030c2371209cc30fb461d0818b;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hp=0000000000000000000000000000000000000000;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad;p=yaffs-website diff --git a/web/core/modules/book/tests/src/Kernel/Plugin/migrate/source/d6/BookTest.php b/web/core/modules/book/tests/src/Kernel/Plugin/migrate/source/d6/BookTest.php new file mode 100644 index 000000000..feece1f7b --- /dev/null +++ b/web/core/modules/book/tests/src/Kernel/Plugin/migrate/source/d6/BookTest.php @@ -0,0 +1,84 @@ + '1', + 'nid' => '4', + 'bid' => '4', + ], + ]; + $tests[0]['source_data']['menu_links'] = [ + [ + 'menu_name' => 'book-toc-1', + 'mlid' => '1', + 'plid' => '0', + 'link_path' => 'node/4', + 'router_path' => 'node/%', + 'link_title' => 'Test top book title', + 'options' => 'a:0:{}', + 'module' => 'book', + 'hidden' => '0', + 'external' => '0', + 'has_children' => '1', + 'expanded' => '0', + 'weight' => '-10', + 'depth' => '1', + 'customized' => '0', + 'p1' => '1', + 'p2' => '0', + 'p3' => '0', + 'p4' => '0', + 'p5' => '0', + 'p6' => '0', + 'p7' => '0', + 'p8' => '0', + 'p9' => '0', + 'updated' => '0', + ], + ]; + + // The expected results. + $tests[0]['expected_data'] = [ + [ + 'nid' => '4', + 'bid' => '4', + 'mlid' => '1', + 'plid' => '0', + 'weight' => '-10', + 'p1' => '1', + 'p2' => '0', + 'p3' => '0', + 'p4' => '0', + 'p5' => '0', + 'p6' => '0', + 'p7' => '0', + 'p8' => '0', + 'p9' => '0', + ], + ]; + return $tests; + } + +}