GraphAware\Neo4j\Client\Tests\Integration\ClientSetupIntegrationTest::testSendWriteUseMasterIfAvailable PHP Method

testSendWriteUseMasterIfAvailable() public method

    public function testSendWriteUseMasterIfAvailable()
    {
        $connectionManager = $this->prophesize(ConnectionManager::class);
        $conn = new Connection('default', 'http://localhost:7474', null, 5);
        $connectionManager->getMasterConnection()->willReturn($conn);
        $connectionManager->getMasterConnection()->shouldBeCalled();
        $client = new Client($connectionManager->reveal());
        $client->runWrite('MATCH (n) RETURN count(n)');
    }