Skip to content

Commit

Permalink
Change localhost IP
Browse files Browse the repository at this point in the history
  • Loading branch information
howyi committed Jan 23, 2018
1 parent de36da6 commit cd31c01
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/Conv/DebugCommand/AbstractCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ abstract class AbstractCommand extends Command
public function getPDO($dbname = null): \PDO
{
if (is_null($dbname)) {
$pdo = new \PDO('mysql:host=localhost;charset=utf8;', 'root', '');
$pdo = new \PDO('mysql:host=127.0.0.1;charset=utf8;', 'root', '');
} else {
$pdo = new \PDO("mysql:host=localhost;dbname=$dbname;charset=utf8;", 'root', '');
$pdo = new \PDO("mysql:host=127.0.0.1;dbname=$dbname;charset=utf8;", 'root', '');
}
$pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
return $pdo;
Expand Down
2 changes: 1 addition & 1 deletion tests/Conv/MigrationGeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class MigrationGeneratorTest extends \PHPUnit\Framework\TestCase
protected function setup()
{
$this->pdo = new \PDO(
"mysql:host=localhost;dbname=conv_test;charset=utf8;",
"mysql:host=127.0.0.1;dbname=conv_test;charset=utf8;",
'root',
'',
[\PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION]
Expand Down
2 changes: 1 addition & 1 deletion tests/Conv/SchemaReflectorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class SchemaReflectorTest extends \PHPUnit\Framework\TestCase

protected function setup()
{
$this->pdo = new \PDO("mysql:host=localhost;dbname=conv_test;charset=utf8;", 'root', '');
$this->pdo = new \PDO("mysql:host=127.0.0.1;dbname=conv_test;charset=utf8;", 'root', '');
$this->prophet = new \Prophecy\Prophet;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@

require dirname(__FILE__).'/../vendor/autoload.php';

$pdo = new \PDO('mysql:host=localhost;charset=utf8;', 'root', '');
$pdo = new \PDO('mysql:host=127.0.0.1;charset=utf8;', 'root', '');
$pdo->exec('DROP DATABASE IF EXISTS conv_test');
$pdo->exec('CREATE DATABASE conv_test');

0 comments on commit cd31c01

Please sign in to comment.