Google\Cloud\Tests\Logger\AppEngineFlexHandlerTest::testOneLine PHP Метод

testOneLine() публичный Метод

public testOneLine ( )
    public function testOneLine()
    {
        $msg = 'Error message';
        $this->log->addError($msg);
        rewind($this->stream);
        $log_text = stream_get_contents($this->stream);
        $log_array = json_decode($log_text, true);
        $this->assertContains($msg, $log_array['message']);
        $this->assertInternalType('int', $log_array['timestamp']['seconds']);
        $this->assertInternalType('int', $log_array['timestamp']['nanos']);
        $this->assertEquals('ERROR', $log_array['severity']);
    }
AppEngineFlexHandlerTest