public function testOne()
{
$query = new Query();
$query->from('yiitest', 'user');
$result = $query->one($this->getConnection());
$this->assertEquals(3, count($result['_source']));
$this->assertArrayHasKey('status', $result['_source']);
$this->assertArrayHasKey('email', $result['_source']);
$this->assertArrayHasKey('name', $result['_source']);
$this->assertArrayHasKey('_id', $result);
$result = $query->where(['name' => 'user1'])->one($this->getConnection());
$this->assertEquals(3, count($result['_source']));
$this->assertArrayHasKey('status', $result['_source']);
$this->assertArrayHasKey('email', $result['_source']);
$this->assertArrayHasKey('name', $result['_source']);
$this->assertArrayHasKey('_id', $result);
$this->assertEquals(1, $result['_id']);
$result = $query->where(['name' => 'user5'])->one($this->getConnection());
$this->assertFalse($result);
}