Skip to content

Commit

Permalink
tests fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pvsaintpe committed Jul 17, 2019
1 parent aa55e16 commit 910b405
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions tests/Unit/Schema/Grammars/GrammarTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function addingGinIndex()
{
$blueprint = new Blueprint('test');
$blueprint->gin('foo');
$statements = $blueprint->toSql($this->getConnection(), $this->getGrammar());
$statements = $blueprint->toSql($this->getConnectionMock(), $this->getGrammar());
$this->assertCount(1, $statements);
$this->assertStringContainsString('CREATE INDEX', $statements[0]);
$this->assertStringContainsString('GIN("foo")', $statements[0]);
Expand All @@ -28,16 +28,13 @@ public function addingGistIndex()
{
$blueprint = new Blueprint('test');
$blueprint->gist('foo');
$statements = $blueprint->toSql($this->getConnection(), $this->getGrammar());
$statements = $blueprint->toSql($this->getConnectionMock(), $this->getGrammar());
$this->assertCount(1, $statements);
$this->assertStringContainsString('CREATE INDEX', $statements[0]);
$this->assertStringContainsString('GIST("foo")', $statements[0]);
}

/**
* @return PostgresConnection
*/
protected function getConnection()
protected function getConnectionMock()
{
return Mockery::mock(PostgresConnection::class);
}
Expand Down

0 comments on commit 910b405

Please sign in to comment.