PHP Classes

File: tests/src/LoggerTest.php

Recommend this page to a friend!
  Classes of Vitaly   QuEasy PHP PSR Logger   tests/src/LoggerTest.php   Download  
File: tests/src/LoggerTest.php
Role: Class source
Content type: text/plain
Description: Class source
Class: QuEasy PHP PSR Logger
Log messages to containers compliant with PSR-3
Author: By
Last change:
Date: 3 years ago
Size: 1,262 bytes
 

Contents

Class file image Download
<?php

namespace queasy\log\tests;

use
Psr\Log\LogLevel;

use
queasy\log\Logger;

use
PHPUnit\Framework\TestCase;

class
LoggerTest extends TestCase
{
    public function
testLevel2intDebug()
    {
       
$this->assertEquals(Logger::level2int(LogLevel::DEBUG), 0);
    }

    public function
testLevel2intInfo()
    {
       
$this->assertEquals(Logger::level2int(LogLevel::INFO), 1);
    }

    public function
testLevel2intNotice()
    {
       
$this->assertEquals(Logger::level2int(LogLevel::NOTICE), 2);
    }

    public function
testLevel2intWarning()
    {
       
$this->assertEquals(Logger::level2int(LogLevel::WARNING), 3);
    }

    public function
testLevel2intError()
    {
       
$this->assertEquals(Logger::level2int(LogLevel::ERROR), 4);
    }

    public function
testLevel2intCritical()
    {
       
$this->assertEquals(Logger::level2int(LogLevel::CRITICAL), 5);
    }

    public function
testLevel2intAlert()
    {
       
$this->assertEquals(Logger::level2int(LogLevel::ALERT), 6);
    }

    public function
testLevel2intEmergency()
    {
       
$this->assertEquals(Logger::level2int(LogLevel::EMERGENCY), 7);
    }

    public function
testLevel2intDummy()
    {
       
$this->assertEquals(Logger::level2int('Dummy'), 0);
    }
}