From 910b4059aeba7fbbd4e4bd7ed698896f3ae7e681 Mon Sep 17 00:00:00 2001 From: Veselov Pavel Date: Wed, 17 Jul 2019 12:39:46 +0300 Subject: [PATCH] tests fixes --- tests/Unit/Schema/Grammars/GrammarTest.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/Unit/Schema/Grammars/GrammarTest.php b/tests/Unit/Schema/Grammars/GrammarTest.php index 8ba667e..808628b 100644 --- a/tests/Unit/Schema/Grammars/GrammarTest.php +++ b/tests/Unit/Schema/Grammars/GrammarTest.php @@ -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]); @@ -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); }