From 6593c8cea47f37c88f3835dbe5e77b76fe972319 Mon Sep 17 00:00:00 2001 From: Klimov Paul Date: Thu, 14 Nov 2013 19:39:08 +0200 Subject: [PATCH] Unit test for "yii\sphinx\Query" advanced --- tests/unit/extensions/sphinx/QueryTest.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/unit/extensions/sphinx/QueryTest.php b/tests/unit/extensions/sphinx/QueryTest.php index cc52e74..cc3e27a 100644 --- a/tests/unit/extensions/sphinx/QueryTest.php +++ b/tests/unit/extensions/sphinx/QueryTest.php @@ -38,6 +38,10 @@ class QueryTest extends SphinxTestCase $match = 'test match'; $query->match($match); $this->assertEquals($match, $query->match); + + $command = $query->createCommand($this->getConnection(false)); + $this->assertContains('MATCH(', $command->getSql(), 'No MATCH operator present!'); + $this->assertContains($match, $command->params, 'No match query among params!'); } public function testWhere()