Skip to content

Commit

Permalink
Merge pull request #26 from foxted/master
Browse files Browse the repository at this point in the history
Fix issue when no socket is defined
  • Loading branch information
freekmurze committed Apr 15, 2015
2 parents ade0c42 + d35d65a commit 2182a72
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 2182a72

Please sign in to comment.