Google\Cloud\Tests\Snippets\Logging\PsrLoggerTest::testLog PHP Method

testLog() public method

public testLog ( )
    public function testLog()
    {
        $snippet = $this->snippetFromMethod(PsrLogger::class, 'log');
        $snippet->addLocal('psrLogger', $this->psr);
        $this->connection->writeEntries(Argument::that(function ($args) {
            if ($args['entries'][0]['severity'] !== Logger::ALERT) {
                return false;
            }
            return true;
        }))->shouldBeCalled();
        $this->psr->setConnection($this->connection->reveal());
        $snippet->invoke();
    }