mirror of
https://github.com/friendica/friendica
synced 2025-05-01 03:04:23 +02:00
Adding Logger Tests
This commit is contained in:
parent
7bebb03f95
commit
aee348fa02
9 changed files with 447 additions and 82 deletions
31
tests/src/Util/Logger/VoidLoggerTest.php
Normal file
31
tests/src/Util/Logger/VoidLoggerTest.php
Normal file
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
|
||||
namespace Friendica\Test\src\Util\Logger;
|
||||
|
||||
use Friendica\Test\MockedTest;
|
||||
use Friendica\Util\Logger\VoidLogger;
|
||||
use Psr\Log\LogLevel;
|
||||
|
||||
class VoidLoggerTest extends MockedTest
|
||||
{
|
||||
use LoggerDataTrait;
|
||||
|
||||
/**
|
||||
* Test if the profiler is profiling data
|
||||
* @dataProvider dataTests
|
||||
*/
|
||||
public function testNormal($function, $message, array $context)
|
||||
{
|
||||
$logger = new VoidLogger();
|
||||
$logger->$function($message, $context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the log() function
|
||||
*/
|
||||
public function testProfilingLog()
|
||||
{
|
||||
$logger = new VoidLogger();
|
||||
$logger->log(LogLevel::WARNING, 'test', ['a' => 'context']);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue