Google\Cloud\Tests\Logging\LoggingClientTest::testGetsSinksWithToken PHP Method

testGetsSinksWithToken() public method

    public function testGetsSinksWithToken()
    {
        $this->connection->listSinks(Argument::any())->willReturn(['nextPageToken' => 'token', 'sinks' => [['name' => 'someOtherSink']]], ['sinks' => [['name' => $this->sinkName]]])->shouldBeCalledTimes(2);
        $this->client->setConnection($this->connection->reveal());
        $sinks = iterator_to_array($this->client->sinks());
        $this->assertEquals($this->sinkName, $sinks[1]->name());
    }