ComposerTest.php

Same filename in other branches
  1. 9 core/tests/Drupal/Tests/Composer/ComposerTest.php
  2. 10 core/tests/Drupal/Tests/Composer/ComposerTest.php
  3. 11.x core/tests/Drupal/Tests/Composer/ComposerTest.php

Namespace

Drupal\Tests\Composer

File

core/tests/Drupal/Tests/Composer/ComposerTest.php

View source
<?php

namespace Drupal\Tests\Composer;

use Drupal\Composer\Composer;
use Drupal\Tests\UnitTestCase;

/**
 * @coversDefaultClass \Drupal\Composer\Composer
 * @group Composer
 */
class ComposerTest extends UnitTestCase {
    
    /**
     * Verify that Composer::ensureComposerVersion() doesn't break.
     *
     * @covers::ensureComposerVersion
     */
    public function testEnsureComposerVersion() {
        try {
            $this->assertNull(Composer::ensureComposerVersion());
        } catch (\RuntimeException $e) {
            $this->assertRegExp('/Drupal core development requires Composer 1.9.0, but Composer /', $e->getMessage());
        }
    }

}

Classes

Title Deprecated Summary
ComposerTest @coversDefaultClass \Drupal\Composer\Composer @group Composer

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