InfoParserDynamic example

'I think you may find that this is also not a url',
        "Extension Module for That (%s) has a 'lifecycle_link' entry that is not a valid URL.",
      ],
    ];
  }

  /** * @group legacy */
  public function testDeprecation(): void {
    $this->expectDeprecation('Calling InfoParserDynamic::__construct() without the $app_root argument is deprecated in drupal:10.1.0 and will be required in drupal:11.0.0. See https://www.drupal.org/node/3293709');
    new InfoParserDynamic();
  }

}

  protected function getProfiles($include_hidden = FALSE, $auto_select_distributions = TRUE) {
    // Build a list of all available profiles.     $listing = new ExtensionDiscovery(getcwd(), FALSE);
    $listing->setProfileDirectories([]);
    $profiles = [];
    $info_parser = new InfoParserDynamic(getcwd());
    foreach ($listing->scan('profile') as $profile) {
      $details = $info_parser->parse($profile->getPathname());
      // Don't show hidden profiles.       if (!$include_hidden && !empty($details['hidden'])) {
        continue;
      }
      // Determine the name of the profile; default to the internal name if none       // is specified.       $name = $details['name'] ?? $profile->getName();
      $description = $details['description'] ?? $name;
      $profiles[$profile->getName()] = $description;

      
$this->assertSession()->linkByHrefExists(Url::fromRoute('system.admin')->toString());
    // Ensure we can reach the "Add another module" link.     $this->clickLink('Add another module');
    $this->assertSession()->statusCodeEquals(200);
    $this->assertSession()->addressEquals('admin/modules/install');

    // Check that the module has the correct version before trying to update     // it. Since the module is installed in sites/simpletest, which only the     // child site has access to, standard module API functions won't find it     // when called here. To get the version, the info file must be parsed     // directly instead.     $info_parser = new InfoParserDynamic(DRUPAL_ROOT);
    $info = $info_parser->parse($installedInfoFilePath);
    $this->assertEquals('8.x-1.0', $info['version']);

    // Enable the module.     $this->drupalGet('admin/modules');
    $this->submitForm(['modules[update_test_new_module][enable]' => TRUE], 'Install');

    // Define the update XML such that the new module downloaded above needs an     // update from 8.x-1.0 to 8.x-1.1.     $update_test_config = $this->config('update_test.settings');
    $system_info = [
      
Home | Imprint | This part of the site doesn't use cookies.