Passed
Push — master ( 826ad0...fdfa6d )
by Maurício
09:44 queued 01:09
created

LoggingTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
dl 0
loc 9
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A testGetLogMessage() 0 7 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace PhpMyAdmin\Tests;
6
7
use PhpMyAdmin\Logging;
8
9
/**
10
 * @covers \PhpMyAdmin\Logging
11
 */
12
class LoggingTest extends AbstractTestCase
13
{
14
    public function testGetLogMessage(): void
15
    {
16
        $_SERVER['REMOTE_ADDR'] = '0.0.0.0';
17
        $log = Logging::getLogMessage('user', 'ok');
18
        $this->assertEquals('user authenticated: user from 0.0.0.0', $log);
19
        $log = Logging::getLogMessage('user', 'error');
20
        $this->assertEquals('user denied: user (error) from 0.0.0.0', $log);
21
    }
22
}
23