Skip to content
Snippets Groups Projects
Commit fcf4aa59 authored by Kunal Sachdev's avatar Kunal Sachdev Committed by Adam G-H
Browse files

Issue #3344556 by kunal.sachdev, phenaproxima: Make ComposerInspector::getVersion() private

parent c52e9ab3
No related branches found
No related tags found
5 merge requests!989Issue #3356804 by phenaproxima: Flag a warning during status check if the...,!734Issue #3344556: Make ComposerInspector::getVersion private,!685Issue #3338667: [PP-1] Add build test to test cweaganscomposer-patches end-to-end,!548Issue #3310729: Incorrect documentation link in UI in case of Process error,!106Issue #3247479: Allow LockFileValidator results to carry multiple messages, and improve their text
......@@ -229,10 +229,8 @@ class ComposerInspector {
*
* @throws \UnexpectedValueException
* Thrown if the expect data format is not found.
*
* @todo Make this method private in https://drupal.org/i/3344556.
*/
public function getVersion(string $working_dir): string {
private function getVersion(string $working_dir): string {
$this->runner->run(['--format=json', "--working-dir=$working_dir"], $this->jsonCallback);
$data = $this->jsonCallback->getOutputData();
if (isset($data['application']['name'])
......
......@@ -59,20 +59,6 @@ class ComposerInspectorTest extends PackageManagerKernelTestBase {
$inspector->getConfig('extra', $dir);
}
/**
* @covers ::getVersion
*/
public function testGetVersion() {
$dir = __DIR__ . '/../../fixtures/fake_site';
$inspector = $this->container->get('package_manager.composer_inspector');
$version = $inspector->getVersion($dir);
// We can assert an exact version of Composer, but we can assert that the
// number is in the expected 'MAJOR.MINOR.PATCH' format.
$parts = explode('.', $version);
$this->assertCount(3, $parts);
$this->assertCount(3, array_filter($parts, 'is_numeric'));
}
/**
* {@inheritdoc}
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment