/**
* @group unit
*/
public function testToArrayForSource()
{
$query = new MoreLikeThis();
$query->setLike(new Document('', array('Foo' => 'Bar'), 'type', 'index'));
$data = $query->toArray();
$this->assertEquals(array('more_like_this' => array('like' => array('_type' => 'type', '_index' => 'index', 'doc' => array('Foo' => 'Bar')))), $data);
}