Skip to content

Commit

Permalink
Fix issue when no socket is defined
Browse files Browse the repository at this point in the history
  • Loading branch information
foxted committed Apr 15, 2015
1 parent ade0c42 commit d35d65a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/BackupHandlers/Database/Databases/MySQLDatabase.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function dump($destinationFile)
escapeshellarg($temporaryCredentialsFile),
escapeshellarg($this->database),
escapeshellarg($destinationFile),
escapeshellarg($this->getSocketArgument())
escapeshellcmd($this->getSocketArgument())
);

return $this->console->run($command);
Expand Down
2 changes: 1 addition & 1 deletion tests/database/MySQLDatabaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function testCustomSocket()
$this->console, 'testDatabase', 'testUser', 'password', 'localhost', '3306', 'customSocket.sock'
);
$this->console->shouldReceive('run')
->with("/mysqldump --defaults-extra-file='(.*)' --skip-comments --skip-extended-insert 'testDatabase' > 'testfile.sql' '--socket=customSocket.sock'/")
->with("/mysqldump --defaults-extra-file='(.*)' --skip-comments --skip-extended-insert 'testDatabase' > 'testfile.sql' --socket=customSocket.sock/")
->once()
->andReturn(true);

Expand Down

0 comments on commit d35d65a

Please sign in to comment.