Commit db6d0a57 by Paul Klimov

Unit test for yii\sphinx\Query::count() added.

parent be2b76d4
......@@ -184,4 +184,15 @@ class QueryTest extends SphinxTestCase
$this->assertContains($snippetOptions['before_match'] . $match, $row['snippet'] . $snippetOptions['after_match'], 'Options not applied!');
}
}
public function testCount()
{
$connection = $this->getConnection();
$query = new Query;
$count = $query->from('yii2_test_article_index')
->match('about')
->count('*', $connection);
$this->assertEquals(2, $count);
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment