Skip to content
Snippets Groups Projects
Commit 37979e39 authored by Mantas Marcinkevičius's avatar Mantas Marcinkevičius
Browse files

added a test for parent inner hit

parent aada6235
No related branches found
No related tags found
No related merge requests found
<?php
namespace ONGR\ElasticsearchDSL\Tests\InnerHit;
use ONGR\ElasticsearchDSL\InnerHit\ParentInnerHit;
use ONGR\ElasticsearchDSL\Query\TermQuery;
class ParentInnerHitTest extends \PHPUnit_Framework_TestCase
{
public function testToArray()
{
$query = new TermQuery('foo', 'bar');
$hit = new ParentInnerHit('test', 'acme', $query);
$expected = [
'type' => [
'acme' => [
'query' => $query->toArray(),
],
],
];
$this->assertEquals($expected, $hit->toArray());
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment