function EnsurePHPStanVersionsMatchTest::testVersions

Same name and namespace in other branches
  1. 11.x core/tests/PHPStan/tests/EnsurePHPStanVersionsMatchTest.php \Drupal\PHPStan\Tests\EnsurePHPStanVersionsMatchTest::testVersions()

File

core/tests/PHPStan/tests/EnsurePHPStanVersionsMatchTest.php, line 16

Class

EnsurePHPStanVersionsMatchTest
Tests that PHPStan version used for rules testing matches core.

Namespace

Drupal\PHPStan\Tests

Code

public function testVersions() : void {
  $test_composer = json_decode(file_get_contents(__DIR__ . '/../composer.json'), TRUE);
  $drupal_composer = json_decode(file_get_contents(__DIR__ . '/../../../../composer/Metapackage/PinnedDevDependencies/composer.json'), TRUE);
  $this->assertSame($test_composer['require-dev']['phpstan/phpstan'], $drupal_composer['require']['phpstan/phpstan']);
}

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