protected function assertDrupalVersion(string
$expectedVersion, string
$dir): void
{ $drupal_php_path =
$dir . '/core/lib/Drupal.php';
$this->
assertFileExists($drupal_php_path);
// Read back the Drupal version that was set and assert it matches
// expectations
$this->
executeCommand("php -r 'include \"
$drupal_php_path\"; print \Drupal::VERSION;'"
);
$this->
assertCommandSuccessful();
$this->
assertCommandOutputContains($expectedVersion);
} /**
* Find all the composer.json files for components.
*
* @param string $drupal_root
* The Drupal root directory.
*
* @return \Symfony\Component\Finder\Finder
* A Finder object with all the composer.json files for components.
*/