for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types = 1);
namespace TBolier\RethinkQL\IntegrationTest\Query;
use TBolier\RethinkQL\Response\Cursor;
class FilterTest extends AbstractTableTest
{
/**
* @throws \Exception
*/
public function testFilter()
$this->insertDocument(1);
/** @var Cursor $cursor */
$cursor = $this->r()
->table('tabletest')
->filter(['title' => 'Test document 1'])
->run();
$this->assertInstanceOf(\Iterator::class, $cursor);
$this->assertInternalType('array', $cursor->current());
}
public function testFilterOnMultipleDocuments()
$this->insertDocument(2);
$this->insertDocument(3);
$this->insertDocument(4);
$this->insertDocument(5);
$this->assertCount(1, $cursor);