Skip to content
Snippets Groups Projects

Issue #3500131: Fix launcher script counter

2 unresolved threads
Closed Stas Zhuk requested to merge issue/drupal_cms-3500131:adjust-launch-script into 1.x
2 unresolved threads
Files
2
@@ -19,16 +19,21 @@ final class LaunchScriptTest extends UnitTestCase {
}
$working_dir = dirname(__FILE__, 7);
$project_name = basename($working_dir);
$project_name = str_replace(['_', ' '], '-', basename($working_dir));
$php = PHP_BINARY;
$php_code = <<<END
#!/usr/bin/env $php
<?php
if (\$argv[1] === "list") {
\$arg2 = \$argv[2] ?? '';
if (\$argv[1] === "describe" && \$arg2 === "$project_name") {
echo "Yes, there is a $project_name project";
}
else {
} elseif (\$argv[1] === "describe") {
// Simulate 'ddev describe' for no project found
exit(1);
} elseif (\$argv[1] === "debug" && \$arg2 === "cd") {
echo "$working_dir";
} else {
echo implode(" ", array_slice(\$argv, 1)) . "\n";
}
END;
@@ -47,7 +52,7 @@ END;
$this->assertSame(0, $launcher->getExitCode(), $launcher->getErrorOutput());
$output = explode("\n", $launcher->getOutput());
$this->assertStringStartsWith('config ', $output[0]);
$this->assertStringContainsString("--project-name=$project_name-2", $output[0]);
$this->assertStringContainsString("--project-name=$project_name-1", $output[0]);
}
}
Loading