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\IntegrationTest\Query\AbstractTableTest;
use TBolier\RethinkQL\Response\ResponseInterface;
class CountTest extends AbstractTableTest
{
/**
* @throws \Exception
*/
public function testCount()
$this->insertDocument(1);
$res = $this->r()
->table('tabletest')
->count()
->run();
$this->assertInternalType('int', $res->getData());
}
public function testFilterCount()
$this->insertDocument(2);
$this->insertDocument(3);
$this->insertDocument(4);
$this->insertDocument(5);
/** @var ResponseInterface $res */
->filter(['id' => 1])
$this->assertEquals(1, $res->getData());
public function testFilterCountOnMultipleDocuments()
->filter(['description' => 'A document description.'])
$this->assertEquals(5, $res->getData());