You are here

public function ComposerIntegrationTest::testComposerJson in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/tests/Drupal/Tests/ComposerIntegrationTest.php \Drupal\Tests\ComposerIntegrationTest::testComposerJson()

Tests composer.json.

File

core/tests/Drupal/Tests/ComposerIntegrationTest.php, line 62
Contains \Drupal\Tests\ComposerIntegrationTest.

Class

ComposerIntegrationTest
Tests Composer integration.

Namespace

Drupal\Tests

Code

public function testComposerJson() {
  foreach ($this
    ->getPaths() as $path) {
    $json = file_get_contents($path . '/composer.json');
    $result = json_decode($json);
    $this
      ->assertNotNull($result, $this
      ->getErrorMessages()[json_last_error()]);
  }
}