Skip to content

Commit

Permalink
ACMS-4333: Fix failing tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
rajeshreeputra committed Nov 22, 2024
1 parent 6ac1a5b commit ba0c74b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 3 additions & 1 deletion tests/src/Functional/Config/DefaultDrushConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,18 @@ public function testDefaultDrushConfigData(): void {
$drushConfig->set("options.root", $drupal_root);
$drushConfig->set("drush.vendor-dir", $project_root . "/vendor");
$drushConfig->set("options.ansi", TRUE);
$drushConfig->set('drush.uri', '/var/www/html/acms.prod/vendor/bin');
$drushConfig->set("runtime.drush-script", $project_root . "/vendor/bin/drush");

$default_drush_config = new DefaultDrushConfig($drushConfig);
$actual = $default_drush_config->export();
$this->assertEquals($actual, [
"drush" => [
"alias" => "self",
"vendor-dir" => $project_root . "/vendor",
"uri" => '/var/www/html/acms.prod/vendor/bin',
"ansi" => TRUE,
"bin" => $project_root . "/vendor/bin/drush",
"vendor-dir" => $project_root . "/vendor",
],
"runtime" => [
"project" => $project_root,
Expand Down
7 changes: 4 additions & 3 deletions tests/src/unit/Robo/Config/ConfigAwareTraitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ class ConfigAwareTraitTest extends TestCase {
*/
public function testGetConfigValue(): void {
$this->config = new DrushConfig();
// Tests when no value exist for the key, then default value must return.
// Tests that default value for key is always set to /bin.
$this->assertEquals(
"/var/www/html/acms.prod/vendor/bin",
$this->getConfigValue("composer.bin", "/var/www/html/acms.prod/vendor/bin"),
"/bin",
$this->getConfigValue("composer.bin"),
);
$drush_config = new DrushConfig();
$drush_config->set('drush.uri', '/var/www/html/acms.prod/vendor/bin');
$drush_config->set("runtime.project", "/var/www/html/acms.prod");
$drush_config->set("options.root", "/var/www/html/acms.prod/docroot");
$drush_config->set("drush.vendor-dir", $drush_config->get("runtime.project") . "/vendor");
Expand Down

0 comments on commit ba0c74b

Please sign in to comment.