Google\Cloud\Tests\Translate\TranslateClientTest::testWithNoKey PHP Method

testWithNoKey() public method

public testWithNoKey ( )
    public function testWithNoKey()
    {
        $client = new TranslateTestClient();
        $this->connection->listTranslations(Argument::that(function ($args) {
            if (!is_null($args['key'])) {
                return false;
            }
            return true;
        }))->shouldBeCalled()->willReturn([]);
        $client->setConnection($this->connection->reveal());
        $client->translate('foo');
    }