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 function testMakeBZ2SingleFile() {
384 // Silently skip bz2 test if bz2 is not installed.
385 exec('which bzip2', $output, $whichBzip2ErrorCode);
386 if (!$whichBzip2ErrorCode) {
387 $this->runMakefileTest('bz2-singlefile');
390 $this->markTestSkipped('bzip2 command not available.');
394 function testMakeContribDestination() {
395 $this->runMakefileTest('contrib-destination');
398 /** @group make.yml */
399 function testMakeContribDestinationYaml() {
400 $this->runMakefileTest('contrib-destination-yaml');
403 function testMakeDefaults() {
404 $this->runMakefileTest('defaults');
407 /** @group make.yml */
408 function testMakeDefaultsYaml() {
409 $this->runMakefileTest('defaults-yaml');
412 function testMakeFile() {
413 $this->runMakefileTest('file');
416 function testMakeFileExtract() {
417 // Silently skip file extraction test if unzip is not installed.
418 exec('which unzip', $output, $whichUnzipErrorCode);
419 if (!$whichUnzipErrorCode) {
420 $this->runMakefileTest('file-extract');
423 $this->markTestSkipped('unzip command not available.');
427 function testMakeGet() {
428 $this->runMakefileTest('get');
431 function testMakeGit() {
432 $this->runMakefileTest('git');
435 function testMakeGitSimple() {
436 $this->runMakefileTest('git-simple');
439 function testMakeGZip() {
440 // Silently skip gzip test if either gzip or unzip is not installed.
441 exec('which gzip', $output, $whichGzipErrorCode);
442 if (!$whichGzipErrorCode) {
443 exec('which unzip', $output, $whichUnzipErrorCode);
444 if (!$whichUnzipErrorCode) {
445 $this->runMakefileTest('gzip');
448 $this->markTestSkipped('unzip command not available.');
452 $this->markTestSkipped('gzip command not available.');
456 function testMakeIgnoreChecksums() {
457 $this->runMakefileTest('ignore-checksums');
460 function testMakeInclude() {
461 $this->runMakefileTest('include');
464 /** @group make.yml */
465 function testMakeIncludeYaml() {
466 $this->runMakefileTest('include-yaml');
470 * Test git support on includes directive.
472 function testMakeIncludesGit() {
473 $config = $this->getMakefile('includes-git');
475 $makefile = $this->makefile_path . DIRECTORY_SEPARATOR . $config['makefile'];
476 $this->drush('make', array($makefile, UNISH_SANDBOX . '/test-git-includes'), $options);
478 // Verify that core and example main module were downloaded.
479 $this->assertFileExists(UNISH_SANDBOX . '/test-git-includes/README.txt');
480 $this->assertFileExists(UNISH_SANDBOX . '/test-git-includes/sites/all/modules/contrib/apachesolr/README.txt');
482 // Verify that module included in sub platform was downloaded.
483 $this->assertFileExists(UNISH_SANDBOX . '/test-git-includes/sites/all/modules/contrib/jquery_update/README.txt');
486 function testMakeLimitProjects() {
487 $this->runMakefileTest('limit-projects');
488 $this->runMakefileTest('limit-projects-multiple');
491 function testMakeLimitLibraries() {
492 $this->runMakefileTest('limit-libraries');
493 $this->runMakefileTest('limit-libraries-multiple');
497 function testMakeMd5Fail() {
498 $this->runMakefileTest('md5-fail');
501 function testMakeMd5Succeed() {
502 $this->runMakefileTest('md5-succeed');
506 * Test that make_move_build() doesn't wipe out directories that it shouldn't.
508 function testMakeMoveBuild() {
509 // Manually download a module.
511 'default-major' => 6, // The makefile used below is core = "6.x".
512 'destination' => UNISH_SANDBOX . '/sites/all/modules/contrib',
516 $this->drush('pm-download', array('cck_signup'), $options);
518 // Build a make file.
519 $config = $this->getMakefile('contrib-destination');
520 $makefile = $this->makefile_path . DIRECTORY_SEPARATOR . $config['makefile'];
521 $this->drush('make', array($makefile, '.'), $config['options']);
523 // Verify that the manually downloaded module still exists.
524 $this->assertFileExists(UNISH_SANDBOX . '/sites/all/modules/contrib/cck_signup/README.txt');
527 function testMakeNoPatchTxt() {
528 $this->runMakefileTest('no-patch-txt');
531 function testMakeNoRecursion() {
532 $config = $this->getMakefile('recursion');
533 $makefile = $this->makefile_path . DIRECTORY_SEPARATOR . $config['makefile'];
535 $install_directory = UNISH_SANDBOX . DIRECTORY_SEPARATOR . 'norecursion';
536 $this->drush('make', array('--no-core', '--no-recursion', $makefile, $install_directory));
537 $this->assertNotContains("ctools", $this->getOutput(), "Make with --no-recursion does not recurse into drupal_forum to download ctools.");
541 * Test no-core and working-copy in options array.
543 function testMakeOptionsArray() {
544 // Use the goptions-array.make file.
545 $config = $this->getMakefile('options-array');
547 $makefile_path = dirname(__FILE__) . '/makefiles';
548 $makefile = $makefile_path . '/' . $config['makefile'];
549 $install_directory = UNISH_SANDBOX . '/options-array';
550 $this->drush('make', array($makefile, $install_directory));
552 // Test cck_signup .git/HEAD file.
553 $this->assertFileExists($install_directory . '/sites/all/modules/cck_signup/.git/HEAD');
554 $contents = file_get_contents($install_directory . '/sites/all/modules/cck_signup/.git/HEAD');
555 $this->assertContains('2fe932c', $contents);
557 // Test context_admin .git/HEAD file.
558 $this->assertFileExists($install_directory . '/sites/all/modules/context_admin/.git/HEAD');
559 $contents = file_get_contents($install_directory . '/sites/all/modules/context_admin/.git/HEAD');
560 $this->assertContains('eb9f05e', $contents);
564 * Test per project working-copy option.
566 function testMakeOptionsProject() {
567 // Use the options-project.make file.
568 $config = $this->getMakefile('options-project');
570 $makefile_path = dirname(__FILE__) . '/makefiles';
571 $options = array('no-core' => NULL);
572 $makefile = $makefile_path . '/' . $config['makefile'];
573 $install_directory = UNISH_SANDBOX . '/options-project';
574 $this->drush('make', array($makefile, $install_directory), $options);
576 // Test context_admin .git/HEAD file.
577 $this->assertFileExists($install_directory . '/sites/all/modules/context_admin/.git/HEAD');
578 $contents = file_get_contents($install_directory . '/sites/all/modules/context_admin/.git/HEAD');
579 $this->assertContains('eb9f05e', $contents);
581 // Test cck_signup .git/HEAD file does not exist.
582 $this->assertFileNotExists($install_directory . '/sites/all/modules/cck_signup/.git/HEAD');
584 // Test caption_filter .git/HEAD file.
585 $this->assertFileExists($install_directory . '/sites/all/modules/contrib/caption_filter/.git/HEAD');
586 $contents = file_get_contents($install_directory . '/sites/all/modules/contrib//caption_filter/.git/HEAD');
587 $this->assertContains('c9794cf', $contents);
590 function testMakePatch() {
591 $this->runMakefileTest('patch');
594 function testMakeRecursion() {
595 $this->runMakefileTest('recursion');
598 function testMakeRecursionOverride() {
599 // @todo This is skipped for now since the test relies on sourceforge.
600 // It can be replaced if a suitable module that installs projects (not
601 // libraries, which aren't properly overridable).
602 $this->markTestSkipped('skipping recursion-override test');
605 // Silently skip file extraction test if unzip is not installed.
606 exec('which unzip', $output, $whichUnzipErrorCode);
607 if (!$whichUnzipErrorCode) {
608 $this->runMakefileTest('recursion-override');
611 $this->markTestSkipped('unzip command not available.');
615 function testMakeSubtree() {
616 // Silently skip subtree test if unzip is not installed.
617 exec('which unzip', $output, $whichUnzipErrorCode);
618 if (!$whichUnzipErrorCode) {
619 $config = $this->getMakefile('subtree');
621 $makefile = $this->makefile_path . DIRECTORY_SEPARATOR . $config['makefile'];
622 $install_directory = UNISH_SANDBOX . DIRECTORY_SEPARATOR . 'subtree';
623 $this->drush('make', array('--no-core', $makefile, $install_directory));
625 $files['nivo-slider'] = array(
627 'jquery.nivo.slider.js',
628 'jquery.nivo.slider.pack.js',
633 'notexists' => array(
638 $files['fullcalendar'] = array(
642 'fullcalendar.min.js',
643 'fullcalendar.print.css',
646 'notexists' => array(
655 $basedir = $install_directory . DIRECTORY_SEPARATOR . 'sites' . DIRECTORY_SEPARATOR . 'all' . DIRECTORY_SEPARATOR . 'libraries';
656 foreach ($files as $lib => $details) {
657 $dir = $basedir . DIRECTORY_SEPARATOR . $lib;
658 if (!empty($details['exists'])) {
659 foreach ($details['exists'] as $file) {
660 $this->assertFileExists($dir . DIRECTORY_SEPARATOR . $file);
664 if (!empty($details['notexists'])) {
665 foreach ($details['notexists'] as $file) {
666 $this->assertFileNotExists($dir . DIRECTORY_SEPARATOR . $file);
672 $this->markTestSkipped('unzip command not available.');
676 function testMakeSvn() {
677 return $this->markTestSkipped('svn support is deprecated.');
678 // Silently skip svn test if svn is not installed.
679 exec('which svn', $output, $whichSvnErrorCode);
680 if (!$whichSvnErrorCode) {
681 $this->runMakefileTest('svn');
684 $this->markTestSkipped('svn command not available.');
689 * Translations can change arbitrarily, so these test for the existence of .po
690 * files, rather than trying to match a build hash.
692 function testMakeTranslations() {
693 $config = $this->getMakefile('translations');
695 $makefile = $this->makefile_path . DIRECTORY_SEPARATOR . $config['makefile'];
696 $install_directory = UNISH_SANDBOX . '/translations';
697 $this->drush('make', array($makefile, $install_directory), $config['options']);
700 'sites/all/modules/token/translations/pt-br.po',
701 'sites/all/modules/token/translations/es.po',
704 foreach ($po_files as $po_file) {
705 $this->assertFileExists($install_directory . '/' . $po_file);
710 * Translations can change arbitrarily, so these test for the existence of .po
711 * files, rather than trying to match a build hash.
713 function testMakeTranslationsInside() {
714 $config = $this->getMakefile('translations-inside');
716 $makefile = $this->makefile_path . '/' . $config['makefile'];
717 $install_directory = UNISH_SANDBOX . '/translations-inside';
718 $this->drush('make', array($makefile, $install_directory));
721 'profiles/default/translations/pt-br.po',
722 'profiles/default/translations/es.po',
723 'sites/all/modules/token/translations/pt-br.po',
724 'sites/all/modules/token/translations/es.po',
725 'modules/system/translations/pt-br.po',
726 'modules/system/translations/es.po',
729 foreach ($po_files as $po_file) {
730 $this->assertFileExists($install_directory . '/' . $po_file);
735 * Translations can change arbitrarily, so these test for the existence of .po
736 * files, rather than trying to match a build hash.
738 function testMakeTranslationsInside7() {
739 $config = $this->getMakefile('translations-inside7');
741 $makefile = $this->makefile_path . DIRECTORY_SEPARATOR . $config['makefile'];
742 $install_directory = UNISH_SANDBOX . '/translations-inside7';
743 $this->drush('make', array($makefile, $install_directory));
746 'profiles/minimal/translations/pt-br.po',
747 'profiles/minimal/translations/es.po',
748 'profiles/testing/translations/pt-br.po',
749 'profiles/testing/translations/es.po',
750 'profiles/standard/translations/pt-br.po',
751 'profiles/standard/translations/es.po',
752 'sites/all/modules/token/translations/pt-br.po',
753 'sites/all/modules/token/translations/es.po',
754 'modules/system/translations/pt-br.po',
755 'modules/system/translations/es.po',
758 foreach ($po_files as $po_file) {
759 $this->assertFileExists($install_directory . '/' . $po_file);
764 * Test that a distribution can be used as a "core" project.
766 function testMakeUseDistributionAsCore() {
767 $this->runMakefileTest('use-distribution-as-core');
771 * Test that files without a core attribute are correctly identified.
773 public function testNoCoreMakefileParsing() {
774 require_once __DIR__ . '/../commands/make/make.utilities.inc';
777 $data = file_get_contents(__DIR__ . '/makefiles/no-core.make');
778 $parsed = _make_determine_format($data);
779 $this->assertEquals('ini', $parsed['format']);
780 $this->assertEquals(42, $parsed['projects']['foo']['version']);
783 $data = file_get_contents(__DIR__ . '/makefiles/no-core.make.yml');
784 $parsed = _make_determine_format($data);
785 $this->assertEquals('yaml', $parsed['format']);
786 $this->assertEquals(42, $parsed['projects']['foo']['version']);