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

testCritical() public method

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