10 class makeMakefileCase extends CommandUnishTestCase {
12 * Path to test make files.
14 protected $makefile_path;
17 * Initialize $makefile_path.
19 function __construct() {
20 $this->makefile_path = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'makefiles';
24 * Run a given makefile test.
27 * The test makefile to run, as defined by $this->getMakefile();
29 private function runMakefileTest($test) {
30 $default_options = array(
34 $config = $this->getMakefile($test);
35 $options = array_merge($config['options'], $default_options);
36 $makefile = $this->makefile_path . DIRECTORY_SEPARATOR . $config['makefile'];
37 $return = !empty($config['fail']) ? self::EXIT_ERROR : self::EXIT_SUCCESS;
38 $this->drush('make', array($makefile), $options, NULL, NULL, $return);
40 // Check the log for the build hash if this test should pass.
41 if (empty($config['fail'])) {
42 $output = $this->getOutput();
43 $this->assertContains($config['md5'], $output, $config['name'] . ' - build md5 matches expected value: ' . $config['md5']);
47 function getMakefile($key) {
49 $tests = $this->listMakefileTests();
53 function listMakefileTests() {
57 'makefile' => 'bzr.make',
59 'md5' => '272e2b9bb27794c54396f2f03c159725',
64 'makefile' => 'bz2.make',
66 'md5' => '5ec081203131a1a3277c8b23f9ddb995',
67 'options' => array('no-core' => NULL),
69 'bz2-singlefile' => array(
70 'name' => 'bzip2 single file',
71 'makefile' => 'bz2-singlefile.make',
73 'md5' => '4f9d57f6caaf6ece0526d867327621cc',
74 'options' => array('no-core' => NULL),
76 'contrib-destination' => array(
77 'name' => 'Contrib-destination attribute',
78 'makefile' => 'contrib-destination.make',
80 'md5' => '2aed36201ede1849ce43d9b7d6f7e9e1',
81 'options' => array('no-core' => NULL, 'contrib-destination' => '.'),
84 'name' => 'Test defaults array.',
85 'makefile' => 'defaults.make',
87 'md5' => 'e6c0d6b37cd8573cbd188742b95a274e',
88 'options' => array('no-core' => NULL, 'contrib-destination' => '.'),
91 'name' => 'File extraction',
92 'makefile' => 'file.make',
94 'md5' => '4e9883d6f9f6572af287635689c2545d',
95 'options' => array('no-core' => NULL),
97 'file-extract' => array(
98 'name' => 'Extract archives',
99 'makefile' => 'file-extract.make',
101 'md5' => 'b43d271ab3510eb33c1e300c78893458',
102 // @todo This test often fails with concurrency set to more than one.
103 'options' => array('no-core' => NULL, 'concurrency' => 1),
106 'name' => 'Test GET retrieval of projects',
107 'makefile' => 'get.make',
109 'md5' => '4bf18507da89bed601548210c22a3bed',
110 'options' => array('no-core' => NULL),
113 'name' => 'GIT integration',
114 'makefile' => 'git.make',
116 'md5' => '4c80d78b50c89b5ba11a997bafec2b43',
117 'options' => array('no-core' => NULL, 'no-gitinfofile' => NULL),
119 'git-simple' => array(
120 'name' => 'Simple git integration',
121 'makefile' => 'git-simple.make',
123 'md5' => '0147681209adef163a8ac2c0cff2a07e',
124 'options' => array('no-core' => NULL, 'no-gitinfofile' => NULL),
126 'git-simple-8' => array(
127 'name' => 'Simple git integration for D8',
128 'makefile' => 'git-simple-8.make',
130 'options' => array('no-core' => NULL),
134 'makefile' => 'gzip.make',
136 'md5' => '25b514df18a87b655437388af083e22c',
137 'options' => array('no-core' => NULL),
139 'ignore-checksums' => array(
140 'name' => 'Ignore invalid checksum/s',
141 'makefile' => 'md5-fail.make',
143 'md5' => 'f76ec174a775ce67f8e9edcb02336ef2',
144 'options' => array('no-core' => NULL, 'ignore-checksums' => NULL),
147 'name' => 'Including files and property overrides',
148 'makefile' => 'include.make',
150 'md5' => 'e2e230ec5eccaf5618050559ab11510d',
151 'options' => array(),
153 'includes-git' => array(
154 'name' => 'Including makefiles from remote repositories',
155 'makefile' => 'includes-main.make',
157 'options' => array(),
159 'limit-libraries' => array(
160 'name' => 'Limit libraries downloaded',
161 'makefile' => 'limited-projects-libraries.make',
163 'md5' => 'cb0da4465d86eb34cafb167787862eb6',
164 'options' => array('no-core' => NULL, 'libraries' => 'drush_make'),
166 'limit-libraries-multiple' => array(
167 'name' => 'Limit multiple libraries downloaded',
168 'makefile' => 'limited-projects-libraries.make',
170 'md5' => '7c10e6fc65728a77a2b0aed4ec2a29cd',
171 'options' => array('no-core' => NULL, 'libraries' => 'drush_make,token'),
173 'limit-projects' => array(
174 'name' => 'Limit projects downloaded',
175 'makefile' => 'limited-projects-libraries.make',
177 'md5' => '3149650120e541d7d0fa577eef0ee9a3',
178 'options' => array('no-core' => NULL, 'projects' => 'boxes'),
180 'limit-projects-multiple' => array(
181 'name' => 'Limit multiple projects downloaded',
182 'makefile' => 'limited-projects-libraries.make',
184 'md5' => 'ef8996c4d6c6f0d229e2237c73860071',
185 'options' => array('no-core' => NULL, 'projects' => 'boxes,admin_menu'),
188 'name' => 'Failed MD5 validation test',
189 'makefile' => 'md5-fail.make',
192 'options' => array('no-core' => NULL),
195 'md5-succeed' => array(
196 'name' => 'MD5 validation',
197 'makefile' => 'md5-succeed.make',
199 'md5' => 'f76ec174a775ce67f8e9edcb02336ef2',
200 'options' => array('no-core' => NULL),
202 'no-patch-txt' => array(
203 'name' => 'Test --no-patch-txt option',
204 'makefile' => 'patches.make',
206 'md5' => '59267a04f98374ed5b0b75e90cefcd9c',
207 'options' => array('no-core' => NULL, 'no-patch-txt' => NULL),
209 'options-array' => array(
210 'name' => 'Test global options array',
211 'makefile' => 'options-array.make',
213 'options' => array(),
215 'options-project' => array(
216 'name' => 'Test per-project options array',
217 'makefile' => 'options-project.make',
219 'options' => array(),
222 'name' => 'Test patching and writing of PATCHES.txt file',
223 'makefile' => 'patches.make',
225 'md5' => '536ee287344c24f47e0808622d7d091b',
226 'options' => array('no-core' => NULL),
228 'recursion' => array(
229 'name' => 'Recursion',
230 'makefile' => 'recursion.make',
232 'md5' => 'cd095bd6dadb2f0d3e81f85f13685372',
235 'contrib-destination' => 'profiles/drupal_forum',
238 'recursion-override' => array(
239 'name' => 'Recursion overrides',
240 'makefile' => 'recursion-override.make',
242 'md5' => 'a13c3d5d416be9fa78569514844b96a2',
248 'name' => 'Use subtree from downloaded archive',
249 'makefile' => 'subtree.make',
251 'md5' => 'db3770d8b4c9ce77510cbbcc566da9b8',
252 'options' => array('no-core' => NULL),
256 'makefile' => 'svn.make',
258 'md5' => '0cb28a15958d7fc4bbf8bf6b00bc6514',
259 'options' => array('no-core' => NULL),
261 'translations' => array(
262 'name' => 'Translation downloads',
263 'makefile' => 'translations.make',
265 'translations' => 'es,pt-br',
269 'translations-inside' => array(
270 'name' => 'Translation downloads inside makefile',
271 'makefile' => 'translations-inside.make',
273 'translations-inside7' => array(
274 'name' => 'Translation downloads inside makefile, core 7.x',
275 'makefile' => 'translations-inside7.make',
277 'use-distribution-as-core' => array(
278 'name' => 'Use distribution as core',
279 'makefile' => 'use-distribution-as-core.make',
281 'md5' => '643a603025a20d498eb583a1e7970bad',
282 'options' => array(),
285 // Replicate ini tests for YAML format.
286 foreach ($tests as $id => $test) {
287 $id_yaml = $id . '-yaml';
288 $tests[$id_yaml] = $test;
289 $tests[$id_yaml]['name'] = $tests[$id]['name'] . '(in YAML format)';
290 $tests[$id_yaml]['makefile'] = $tests[$id]['makefile'] . '.yml';
295 /************************************************************************
297 * List of make tests (in alphabetical order, for easier navigation.) *
299 ************************************************************************/
302 * Test .info file writing and the use of a git reference cache for
305 function testInfoFileWritingGit() {
306 // Use the git-simple.make file.
307 $config = $this->getMakefile('git-simple');
309 $options = array('no-core' => NULL);
310 $makefile = $this->makefile_path . DIRECTORY_SEPARATOR . $config['makefile'];
311 $this->drush('make', array($makefile, UNISH_SANDBOX . '/test-build'), $options);
313 // Test cck_signup.info file.
314 $this->assertFileExists(UNISH_SANDBOX . '/test-build/sites/all/modules/cck_signup/cck_signup.info');
315 $contents = file_get_contents(UNISH_SANDBOX . '/test-build/sites/all/modules/cck_signup/cck_signup.info');
316 $this->assertContains('; Information added by drush on 2011-07-27', $contents);
317 $this->assertContains('version = "2fe932c"', $contents);
318 $this->assertContains('project = "cck_signup"', $contents);
320 // Verify that a reference cache was created.
321 $cache_dir = UNISH_CACHE . DIRECTORY_SEPARATOR . 'cache';
322 $this->assertFileExists($cache_dir . '/git/cck_signup-' . md5('http://git.drupal.org/project/cck_signup.git'));
324 // Test context_admin.info file.
325 $this->assertFileExists(UNISH_SANDBOX . '/test-build/sites/all/modules/context_admin/context_admin.info');
326 $contents = file_get_contents(UNISH_SANDBOX . '/test-build/sites/all/modules/context_admin/context_admin.info');
327 $this->assertContains('; Information added by drush on 2011-10-27', $contents);
328 $this->assertContains('version = "eb9f05e"', $contents);
329 $this->assertContains('project = "context_admin"', $contents);
331 // Verify git reference cache exists.
332 $this->assertFileExists($cache_dir . '/git/context_admin-' . md5('http://git.drupal.org/project/context_admin.git'));
334 // Text caption_filter .info rewrite.
335 $this->assertFileExists(UNISH_SANDBOX . '/test-build/sites/all/modules/contrib/caption_filter/caption_filter.info');
336 $contents = file_get_contents(UNISH_SANDBOX . '/test-build/sites/all/modules/contrib/caption_filter/caption_filter.info');
337 $this->assertContains('; Information added by drush on 2011-09-20', $contents);
338 $this->assertContains('version = "7.x-1.2+0-dev"', $contents);
339 $this->assertContains('project = "caption_filter"', $contents);
343 * Test .info file writing and the use of a git reference cache for
346 function testInfoYamlFileWritingGit() {
347 // Use the Drupal 8 .make file.
348 $config = $this->getMakefile('git-simple-8');
350 $options = array('no-core' => NULL);
351 $makefile = $this->makefile_path . DIRECTORY_SEPARATOR . $config['makefile'];
352 $this->drush('make', array($makefile, UNISH_SANDBOX . '/test-build'), $options);
354 $this->assertFileExists(UNISH_SANDBOX . '/test-build/modules/honeypot/honeypot.info.yml');
355 $contents = file_get_contents(UNISH_SANDBOX . '/test-build/modules/honeypot/honeypot.info.yml');
356 $this->assertContains('# Information added by drush on 2015-09-03', $contents);
357 $this->assertContains("version: '8.x-1.x-dev'", $contents);
358 $this->assertContains("project: 'honeypot'", $contents);
361 function testMakeBzr() {
362 // Silently skip bzr test if bzr is not installed.
363 exec('which bzr', $output, $whichBzrErrorCode);
364 if (!$whichBzrErrorCode) {
365 $this->runMakefileTest('bzr');
368 $this->markTestSkipped('bzr command is not available.');
372 function testMakeBZ2() {
373 // Silently skip bz2 test if bz2 is not installed.
374 exec('which bzip2', $output, $whichBzip2ErrorCode);
375 if (!$whichBzip2ErrorCode) {
376 $this->runMakefileTest('bz2');
379 $this->markTestSkipped('bzip2 command not available.');
383 /* TODO: http://download.gna.org/wkhtmltopdf/obsolete/linux/wkhtmltopdf-0.11.0_rc1-static-amd64.tar.bz2 cannot be downloaded any longer
384 function testMakeBZ2SingleFile() {
385 // Silently skip bz2 test if bz2 is not installed.
386 exec('which bzip2', $output, $whichBzip2ErrorCode);
387 if (!$whichBzip2ErrorCode) {
388 $this->runMakefileTest('bz2-singlefile');
391 $this->markTestSkipped('bzip2 command not available.');
396 function testMakeContribDestination() {
397 $this->runMakefileTest('contrib-destination');
400 /** @group make.yml */
401 function testMakeContribDestinationYaml() {
402 $this->runMakefileTest('contrib-destination-yaml');
405 function testMakeDefaults() {
406 $this->runMakefileTest('defaults');
409 /** @group make.yml */
410 function testMakeDefaultsYaml() {
411 $this->runMakefileTest('defaults-yaml');
414 function testMakeFile() {
415 $this->runMakefileTest('file');
418 function testMakeFileExtract() {
419 // Silently skip file extraction test if unzip is not installed.
420 exec('which unzip', $output, $whichUnzipErrorCode);
421 if (!$whichUnzipErrorCode) {
422 $this->runMakefileTest('file-extract');
425 $this->markTestSkipped('unzip command not available.');
429 function testMakeGet() {
430 $this->runMakefileTest('get');
433 function testMakeGit() {
434 $this->runMakefileTest('git');
437 function testMakeGitSimple() {
438 $this->runMakefileTest('git-simple');
441 function testMakeGZip() {
442 // Silently skip gzip test if either gzip or unzip is not installed.
443 exec('which gzip', $output, $whichGzipErrorCode);
444 if (!$whichGzipErrorCode) {
445 exec('which unzip', $output, $whichUnzipErrorCode);
446 if (!$whichUnzipErrorCode) {
447 $this->runMakefileTest('gzip');
450 $this->markTestSkipped('unzip command not available.');
454 $this->markTestSkipped('gzip command not available.');
458 function testMakeIgnoreChecksums() {
459 $this->runMakefileTest('ignore-checksums');
462 function testMakeInclude() {
463 $this->runMakefileTest('include');
466 /** @group make.yml */
467 function testMakeIncludeYaml() {
468 $this->runMakefileTest('include-yaml');
472 * Test git support on includes directive.
474 function testMakeIncludesGit() {
475 $config = $this->getMakefile('includes-git');
477 $makefile = $this->makefile_path . DIRECTORY_SEPARATOR . $config['makefile'];
478 $this->drush('make', array($makefile, UNISH_SANDBOX . '/test-git-includes'), $options);
480 // Verify that core and example main module were downloaded.
481 $this->assertFileExists(UNISH_SANDBOX . '/test-git-includes/README.txt');
482 $this->assertFileExists(UNISH_SANDBOX . '/test-git-includes/sites/all/modules/contrib/apachesolr/README.txt');
484 // Verify that module included in sub platform was downloaded.
485 $this->assertFileExists(UNISH_SANDBOX . '/test-git-includes/sites/all/modules/contrib/jquery_update/README.txt');
488 function testMakeLimitProjects() {
489 $this->runMakefileTest('limit-projects');
490 $this->runMakefileTest('limit-projects-multiple');
493 function testMakeLimitLibraries() {
494 $this->runMakefileTest('limit-libraries');
495 $this->runMakefileTest('limit-libraries-multiple');
499 function testMakeMd5Fail() {
500 $this->runMakefileTest('md5-fail');
503 function testMakeMd5Succeed() {
504 $this->runMakefileTest('md5-succeed');
508 * Test that make_move_build() doesn't wipe out directories that it shouldn't.
510 function testMakeMoveBuild() {
511 // Manually download a module.
513 'default-major' => 6, // The makefile used below is core = "6.x".
514 'destination' => UNISH_SANDBOX . '/sites/all/modules/contrib',
518 $this->drush('pm-download', array('cck_signup'), $options);
520 // Build a make file.
521 $config = $this->getMakefile('contrib-destination');
522 $makefile = $this->makefile_path . DIRECTORY_SEPARATOR . $config['makefile'];
523 $this->drush('make', array($makefile, '.'), $config['options']);
525 // Verify that the manually downloaded module still exists.
526 $this->assertFileExists(UNISH_SANDBOX . '/sites/all/modules/contrib/cck_signup/README.txt');
529 function testMakeNoPatchTxt() {
530 $this->runMakefileTest('no-patch-txt');
533 function testMakeNoRecursion() {
534 $config = $this->getMakefile('recursion');
535 $makefile = $this->makefile_path . DIRECTORY_SEPARATOR . $config['makefile'];
537 $install_directory = UNISH_SANDBOX . DIRECTORY_SEPARATOR . 'norecursion';
538 $this->drush('make', array('--no-core', '--no-recursion', $makefile, $install_directory));
539 $this->assertNotContains("ctools", $this->getOutput(), "Make with --no-recursion does not recurse into drupal_forum to download ctools.");
543 * Test no-core and working-copy in options array.
545 function testMakeOptionsArray() {
546 // Use the goptions-array.make file.
547 $config = $this->getMakefile('options-array');
549 $makefile_path = dirname(__FILE__) . '/makefiles';
550 $makefile = $makefile_path . '/' . $config['makefile'];
551 $install_directory = UNISH_SANDBOX . '/options-array';
552 $this->drush('make', array($makefile, $install_directory));
554 // Test cck_signup .git/HEAD file.
555 $this->assertFileExists($install_directory . '/sites/all/modules/cck_signup/.git/HEAD');
556 $contents = file_get_contents($install_directory . '/sites/all/modules/cck_signup/.git/HEAD');
557 $this->assertContains('2fe932c', $contents);
559 // Test context_admin .git/HEAD file.
560 $this->assertFileExists($install_directory . '/sites/all/modules/context_admin/.git/HEAD');
561 $contents = file_get_contents($install_directory . '/sites/all/modules/context_admin/.git/HEAD');
562 $this->assertContains('eb9f05e', $contents);
566 * Test per project working-copy option.
568 function testMakeOptionsProject() {
569 // Use the options-project.make file.
570 $config = $this->getMakefile('options-project');
572 $makefile_path = dirname(__FILE__) . '/makefiles';
573 $options = array('no-core' => NULL);
574 $makefile = $makefile_path . '/' . $config['makefile'];
575 $install_directory = UNISH_SANDBOX . '/options-project';
576 $this->drush('make', array($makefile, $install_directory), $options);
578 // Test context_admin .git/HEAD file.
579 $this->assertFileExists($install_directory . '/sites/all/modules/context_admin/.git/HEAD');
580 $contents = file_get_contents($install_directory . '/sites/all/modules/context_admin/.git/HEAD');
581 $this->assertContains('eb9f05e', $contents);
583 // Test cck_signup .git/HEAD file does not exist.
584 $this->assertFileNotExists($install_directory . '/sites/all/modules/cck_signup/.git/HEAD');
586 // Test caption_filter .git/HEAD file.
587 $this->assertFileExists($install_directory . '/sites/all/modules/contrib/caption_filter/.git/HEAD');
588 $contents = file_get_contents($install_directory . '/sites/all/modules/contrib//caption_filter/.git/HEAD');
589 $this->assertContains('c9794cf', $contents);
592 function testMakePatch() {
593 $this->runMakefileTest('patch');
596 function testMakeRecursion() {
597 $this->runMakefileTest('recursion');
600 function testMakeRecursionOverride() {
601 // @todo This is skipped for now since the test relies on sourceforge.
602 // It can be replaced if a suitable module that installs projects (not
603 // libraries, which aren't properly overridable).
604 $this->markTestSkipped('skipping recursion-override test');
607 // Silently skip file extraction test if unzip is not installed.
608 exec('which unzip', $output, $whichUnzipErrorCode);
609 if (!$whichUnzipErrorCode) {
610 $this->runMakefileTest('recursion-override');
613 $this->markTestSkipped('unzip command not available.');
617 function testMakeSubtree() {
618 // Silently skip subtree test if unzip is not installed.
619 exec('which unzip', $output, $whichUnzipErrorCode);
620 if (!$whichUnzipErrorCode) {
621 $config = $this->getMakefile('subtree');
623 $makefile = $this->makefile_path . DIRECTORY_SEPARATOR . $config['makefile'];
624 $install_directory = UNISH_SANDBOX . DIRECTORY_SEPARATOR . 'subtree';
625 $this->drush('make', array('--no-core', $makefile, $install_directory));
627 $files['nivo-slider'] = array(
629 'jquery.nivo.slider.js',
630 'jquery.nivo.slider.pack.js',
635 'notexists' => array(
640 $files['fullcalendar'] = array(
644 'fullcalendar.min.js',
645 'fullcalendar.print.css',
648 'notexists' => array(
657 $basedir = $install_directory . DIRECTORY_SEPARATOR . 'sites' . DIRECTORY_SEPARATOR . 'all' . DIRECTORY_SEPARATOR . 'libraries';
658 foreach ($files as $lib => $details) {
659 $dir = $basedir . DIRECTORY_SEPARATOR . $lib;
660 if (!empty($details['exists'])) {
661 foreach ($details['exists'] as $file) {
662 $this->assertFileExists($dir . DIRECTORY_SEPARATOR . $file);
666 if (!empty($details['notexists'])) {
667 foreach ($details['notexists'] as $file) {
668 $this->assertFileNotExists($dir . DIRECTORY_SEPARATOR . $file);
674 $this->markTestSkipped('unzip command not available.');
678 function testMakeSvn() {
679 return $this->markTestSkipped('svn support is deprecated.');
680 // Silently skip svn test if svn is not installed.
681 exec('which svn', $output, $whichSvnErrorCode);
682 if (!$whichSvnErrorCode) {
683 $this->runMakefileTest('svn');
686 $this->markTestSkipped('svn command not available.');
691 * Translations can change arbitrarily, so these test for the existence of .po
692 * files, rather than trying to match a build hash.
694 function testMakeTranslations() {
695 $config = $this->getMakefile('translations');
697 $makefile = $this->makefile_path . DIRECTORY_SEPARATOR . $config['makefile'];
698 $install_directory = UNISH_SANDBOX . '/translations';
699 $this->drush('make', array($makefile, $install_directory), $config['options']);
702 'sites/all/modules/token/translations/pt-br.po',
703 'sites/all/modules/token/translations/es.po',
706 foreach ($po_files as $po_file) {
707 $this->assertFileExists($install_directory . '/' . $po_file);
712 * Translations can change arbitrarily, so these test for the existence of .po
713 * files, rather than trying to match a build hash.
715 function testMakeTranslationsInside() {
716 $config = $this->getMakefile('translations-inside');
718 $makefile = $this->makefile_path . '/' . $config['makefile'];
719 $install_directory = UNISH_SANDBOX . '/translations-inside';
720 $this->drush('make', array($makefile, $install_directory));
723 'profiles/default/translations/pt-br.po',
724 'profiles/default/translations/es.po',
725 'sites/all/modules/token/translations/pt-br.po',
726 'sites/all/modules/token/translations/es.po',
727 'modules/system/translations/pt-br.po',
728 'modules/system/translations/es.po',
731 foreach ($po_files as $po_file) {
732 $this->assertFileExists($install_directory . '/' . $po_file);
737 * Translations can change arbitrarily, so these test for the existence of .po
738 * files, rather than trying to match a build hash.
740 function testMakeTranslationsInside7() {
741 $config = $this->getMakefile('translations-inside7');
743 $makefile = $this->makefile_path . DIRECTORY_SEPARATOR . $config['makefile'];
744 $install_directory = UNISH_SANDBOX . '/translations-inside7';
745 $this->drush('make', array($makefile, $install_directory));
748 'profiles/minimal/translations/pt-br.po',
749 'profiles/minimal/translations/es.po',
750 'profiles/testing/translations/pt-br.po',
751 'profiles/testing/translations/es.po',
752 'profiles/standard/translations/pt-br.po',
753 'profiles/standard/translations/es.po',
754 'sites/all/modules/token/translations/pt-br.po',
755 'sites/all/modules/token/translations/es.po',
756 'modules/system/translations/pt-br.po',
757 'modules/system/translations/es.po',
760 foreach ($po_files as $po_file) {
761 $this->assertFileExists($install_directory . '/' . $po_file);
766 * Test that a distribution can be used as a "core" project.
768 function testMakeUseDistributionAsCore() {
769 $this->runMakefileTest('use-distribution-as-core');
773 * Test that files without a core attribute are correctly identified.
775 public function testNoCoreMakefileParsing() {
776 require_once __DIR__ . '/../commands/make/make.utilities.inc';
779 $data = file_get_contents(__DIR__ . '/makefiles/no-core.make');
780 $parsed = _make_determine_format($data);
781 $this->assertEquals('ini', $parsed['format']);
782 $this->assertEquals(42, $parsed['projects']['foo']['version']);
785 $data = file_get_contents(__DIR__ . '/makefiles/no-core.make.yml');
786 $parsed = _make_determine_format($data);
787 $this->assertEquals('yaml', $parsed['format']);
788 $this->assertEquals(42, $parsed['projects']['foo']['version']);