function Fixtures::composerJson

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Composer/Generator/Fixtures.php \Drupal\Tests\Composer\Generator\Fixtures::composerJson()
  2. 10 core/tests/Drupal/Tests/Composer/Generator/Fixtures.php \Drupal\Tests\Composer\Generator\Fixtures::composerJson()
  3. 11.x core/tests/Drupal/Tests/Composer/Generator/Fixtures.php \Drupal\Tests\Composer\Generator\Fixtures::composerJson()

Data for a composer.json fixture.

Return value

array composer.json fixture data.

1 call to Fixtures::composerJson()
Fixtures::drupalCoreComposerFixture in core/tests/Drupal/Tests/Composer/Generator/Fixtures.php
Generate a suitable DrupalCoreComposer fixture for testing.

File

core/tests/Drupal/Tests/Composer/Generator/Fixtures.php, line 28

Class

Fixtures
Convenience class for creating fixtures.

Namespace

Drupal\Tests\Composer\Generator

Code

protected function composerJson() {
    return [
        'name' => 'drupal/project-fixture',
        'description' => 'A fixture for testing the metapackage generator.',
        'type' => 'project',
        'license' => 'GPL-2.0-or-later',
        'require' => [
            'composer/installers' => '^1.9',
            'php' => '>=7.0.8',
            'symfony/yaml' => '~3.4.5',
        ],
        'require-dev' => [
            'behat/mink' => '^1.8',
        ],
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.