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\Connection;
use Mockery;
use Mockery\MockInterface;
use TBolier\RethinkQL\Connection\ConnectionInterface;
use TBolier\RethinkQL\Connection\OptionsInterface;
use TBolier\RethinkQL\IntegrationTest\BaseTestCase;
use TBolier\RethinkQL\Types\Query\QueryType;
class ConnectionTest extends BaseTestCase
{
/**
* @var MockInterface
*/
private $optionsMock;
public function setUp()
parent::setUp();
$this->optionsMock = Mockery::mock(OptionsInterface::class);
}
* @throws \Exception
public function testConnect()
/** @var ConnectionInterface $connection */
$connection = $this->createConnection('phpunit_default')->connect();
$this->assertInternalType('array', $connection->expr('foo'));
public function testServer()
$res = $this->createConnection('phpunit_default')->connect()->server();
$this->assertEquals(QueryType::SERVER_INFO, $res['t']);