Google\Cloud\Tests\Snippets\Speech\SpeechClientTest::testOperation PHP Method

testOperation() public method

public testOperation ( )
    public function testOperation()
    {
        $opName = 'testOperation';
        $snippet = $this->snippetFromMethod(SpeechClient::class, 'operation');
        $snippet->addLocal('speech', $this->client);
        $snippet->addLocal('operationName', $opName);
        $res = $snippet->invoke('operation');
        $this->assertInstanceOf(Operation::class, $res->returnVal());
        $this->assertEquals($opName, $res->returnVal()->name());
    }