Commit 0ca0f2c7 authored by catch's avatar catch
Browse files

Issue #3053897 by alexpott, UpTil4Music, webflo: No version key/value pair in...

Issue #3053897 by alexpott, UpTil4Music, webflo: No version key/value pair in new core modules (json_api, migrate_drupal_multilingual)

(cherry picked from commit 944bcb1e)
parent b9d7fac5
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@ name: JSON:API
type: module
description: Exposes entities as a JSON:API-specification-compliant web API.
package: Web services
version: VERSION
configure: jsonapi.settings
dependencies:
  - drupal:serialization
+1 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@ name: 'Migrate Drupal Multilingual'
type: module
description: 'Provides a requirement for multilingual migrations.'
package: 'Core (Experimental)'
version: VERSION
dependencies:
  - drupal:migrate_drupal
hidden: true
+30 −0
Original line number Diff line number Diff line
<?php

namespace Drupal\Tests\Core\Extension;

use Drupal\Component\Serialization\Yaml;
use Drupal\KernelTests\FileSystemModuleDiscoveryDataProviderTrait;
use Drupal\Tests\UnitTestCase;

/**
 * Tests that core module info files have the expected keys.
 *
 * @group Extension
 */
class ModuleInfoTest extends UnitTestCase {

  use FileSystemModuleDiscoveryDataProviderTrait;

  /**
   * Tests that core module info files have the expected keys.
   *
   * @dataProvider coreModuleListDataProvider
   */
  public function testModuleInfo($module) {
    $module_directory = __DIR__ . '/../../../../../modules/' . $module;
    $info = Yaml::decode(file_get_contents($module_directory . '/' . $module . '.info.yml'));
    $this->assertArrayHasKey('version', $info);
    $this->assertEquals('VERSION', $info['version']);
  }

}