public function makeMakefileCase::testNoCoreMakefileParsing

8.0.x makeTest.php public makeMakefileCase::testNoCoreMakefileParsing()
7.x makeTest.php public makeMakefileCase::testNoCoreMakefileParsing()
master makeTest.php public makeMakefileCase::testNoCoreMakefileParsing()

Test that files without a core attribute are correctly identified.

File

tests/makeTest.php, line 765

Namespace

Unish

Class

makeMakefileCase
Make makefile tests. @group make @group slow

Code

public function testNoCoreMakefileParsing() {
  require __DIR__ . '/../commands/make/make.utilities.inc';

  // INI.
  $data = file_get_contents(__DIR__ . '/makefiles/no-core.make');
  $parsed = _make_determine_format($data);
  $this->assertEquals('ini', $parsed['format']);
  $this->assertEquals(42, $parsed['projects']['foo']['version']);

  // YAML.
  $data = file_get_contents(__DIR__ . '/makefiles/no-core.make.yml');
  $parsed = _make_determine_format($data);
  $this->assertEquals('yaml', $parsed['format']);
  $this->assertEquals(42, $parsed['projects']['foo']['version']);
}