From 525f16579cf3843e157df9c3e7a83f31bca429ed Mon Sep 17 00:00:00 2001 From: Dane Powell Date: Mon, 27 Nov 2023 10:21:45 -0800 Subject: [PATCH] fix windows --- tests/phpunit/src/Commands/Pull/PullDatabaseCommandTest.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/src/Commands/Pull/PullDatabaseCommandTest.php b/tests/phpunit/src/Commands/Pull/PullDatabaseCommandTest.php index 7c7a6e913..9dffbf465 100644 --- a/tests/phpunit/src/Commands/Pull/PullDatabaseCommandTest.php +++ b/tests/phpunit/src/Commands/Pull/PullDatabaseCommandTest.php @@ -17,6 +17,7 @@ use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Output\BufferedOutput; use Symfony\Component\Filesystem\Filesystem; +use Symfony\Component\Filesystem\Path; /** * @property \Acquia\Cli\Command\Pull\PullDatabaseCommand $command @@ -311,8 +312,8 @@ protected function mockExecuteMySqlImport( $localMachineHelper->checkRequiredBinariesExist(['gunzip', 'mysql'])->shouldBeCalled(); $this->mockExecutePvExists($localMachineHelper, $pvExists); $process = $this->mockProcess($success); - $tmpDir = sys_get_temp_dir(); - $command = $pvExists ? "pv $tmpDir/dev-$dbName-$dbMachineName-2012-05-15T12:00:00Z.sql.gz --bytes --rate | gunzip | MYSQL_PWD=drupal mysql --host=localhost --user=drupal $localDbName" : "gunzip -c $tmpDir/dev-$dbName-$dbMachineName-2012-05-15T12:00:00Z.sql.gz | MYSQL_PWD=drupal mysql --host=localhost --user=drupal $localDbName"; + $filePath = Path::join(sys_get_temp_dir(), "dev-$dbName-$dbMachineName-2012-05-15T12:00:00Z.sql.gz"); + $command = $pvExists ? "pv $filePath --bytes --rate | gunzip | MYSQL_PWD=drupal mysql --host=localhost --user=drupal $localDbName" : "gunzip -c $filePath | MYSQL_PWD=drupal mysql --host=localhost --user=drupal $localDbName"; // MySQL import command. $localMachineHelper ->executeFromCmd($command, Argument::type('callable'),