Google\Cloud\Tests\Snippets\Translate\TranslateClientTest::testLocalizedLanguages PHP Method

testLocalizedLanguages() public method

    public function testLocalizedLanguages()
    {
        $snippet = $this->snippetFromMethod(TranslateClient::class, 'localizedLanguages');
        $snippet->addLocal('translate', $this->client);
        $this->connection->listLanguages(Argument::any())->shouldbeCalled()->willReturn(['data' => ['languages' => [['language' => 'en', 'name' => 'English']]]]);
        $this->client->setConnection($this->connection->reveal());
        $res = $snippet->invoke();
        $this->assertEquals('en', $res->output());
    }