Google\Cloud\Tests\System\Logging\ManageSinksTest::testCreateSink PHP Method

testCreateSink() public method

public testCreateSink ( $client, $destination )
    public function testCreateSink($client, $destination)
    {
        $name = uniqid(self::TESTING_PREFIX);
        $options = ['outputVersionFormat' => 'V2', 'filter' => 'severity >= ERROR'];
        $this->assertFalse($client->sink($name)->exists());
        $sink = $client->createSink($name, $destination, $options);
        self::$deletionQueue[] = $sink;
        $this->assertTrue($client->sink($name)->exists());
        $this->assertEquals($destination, $sink->info()['destination']);
        $this->assertEquals($options['outputVersionFormat'], $sink->info()['outputVersionFormat']);
        $this->assertEquals($options['filter'], $sink->info()['filter']);
    }