<?php

namespace Tests\Feature;

use Buckhill\LogMe\Facades\ElasticSearch;
use Tests\BaseTestCase;

class ESIndexTest extends BaseTestCase
{
    public function testWriteToIndex()
    {
        $result = ElasticSearch::index([
            'index' => 'test',
            'type' => 'test',
            'id' => str_replace('.', '', microtime(true)),
            'body' => [
                'message' => 'Test message'
            ]
        ]);

        $this->assertTrue(is_array($result));
    }
}