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

testCreatesSink() public method

public testCreatesSink ( )
    public function testCreatesSink()
    {
        $destination = 'storage.googleapis.com/my-bucket';
        $this->connection->createSink(['parent' => $this->formattedProjectId, 'name' => $this->sinkName, 'destination' => $destination, 'outputVersionFormat' => 'VERSION_FORMAT_UNSPECIFIED'])->willReturn(['name' => $this->sinkName, 'destination' => $destination])->shouldBeCalledTimes(1);
        $this->client->setConnection($this->connection->reveal());
        $sink = $this->client->createSink($this->sinkName, $destination);
        $this->assertInstanceOf(Sink::class, $sink);
        $this->assertEquals($this->sinkName, $sink->info()['name']);
    }