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

testUpdateSink() public method

public testUpdateSink ( $client )
    public function testUpdateSink($client)
    {
        $name = uniqid(self::TESTING_PREFIX);
        $destination = sprintf('pubsub.googleapis.com/%s', self::$topic->info()['name']);
        $createOptions = ['outputVersionFormat' => 'V2', 'filter' => 'severity >= ERROR'];
        $updateOptions = ['filter' => 'severity >= DEBUG'];
        $sink = $client->createSink($name, $destination, $createOptions);
        self::$deletionQueue[] = $sink;
        $info = $sink->update($updateOptions);
        $this->assertEquals($name, $sink->name());
        $this->assertEquals($updateOptions['filter'], $info['filter']);
    }