Google\Cloud\Tests\Snippets\Logging\SinkTest::testExists PHP Method

testExists() public method

public testExists ( )
    public function testExists()
    {
        $snippet = $this->snippetFromMethod(Sink::class, 'exists');
        $snippet->addLocal('sink', $this->sink);
        $this->connection->getSink(Argument::any())->shouldBeCalled()->willReturn([]);
        $this->sink->setConnection($this->connection->reveal());
        $res = $snippet->invoke();
        $this->assertEquals('Sink exists!', $res->output());
    }