60 lines
1.6 KiB
PHP
60 lines
1.6 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
|
|
*
|
|
* For the full copyright and license information, please view
|
|
* the LICENSE file that was distributed with this source code.
|
|
*
|
|
* https://www.d3data.de
|
|
*
|
|
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
|
|
* @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
|
|
* @link https://www.oxidmodule.com
|
|
*/
|
|
|
|
namespace D3\LoggerFactory\tests\Options;
|
|
|
|
use D3\LoggerFactory\Options\FileLoggerHandlerOption;
|
|
use D3\LoggerFactory\Options\MailLoggerHandlerOption;
|
|
use D3\LoggerFactory\Options\OtherLoggerHandlerOption;
|
|
use D3\LoggerFactory\tests\AbstractTestCase;
|
|
use D3\LoggerFactory\tests\Helpers\UnknownOption;
|
|
use Generator;
|
|
use InvalidArgumentException;
|
|
use Monolog\Formatter\HtmlFormatter;
|
|
use Monolog\Formatter\LineFormatter;
|
|
use Monolog\Handler\FirePHPHandler;
|
|
use Monolog\Handler\NativeMailerHandler;
|
|
use Monolog\Handler\RotatingFileHandler;
|
|
use Monolog\Handler\StreamHandler;
|
|
use Monolog\Logger;
|
|
use ReflectionException;
|
|
|
|
/**
|
|
* @coversNothing
|
|
*/
|
|
class OtherLoggerHandlerOptionTest extends AbstractTestCase
|
|
{
|
|
/**
|
|
* @test
|
|
* @throws ReflectionException
|
|
* @covers \D3\LoggerFactory\Options\OtherLoggerHandlerOption::__construct
|
|
* @covers \D3\LoggerFactory\Options\OtherLoggerHandlerOption::getHandler
|
|
*/
|
|
public function testConstruct(): void
|
|
{
|
|
$sut = new OtherLoggerHandlerOption(new FirePHPHandler(Logger::INFO));
|
|
|
|
$handler = $this->callMethod(
|
|
$sut,
|
|
'getHandler'
|
|
);
|
|
|
|
$this->assertInstanceOf(
|
|
FirePHPHandler::class,
|
|
$handler
|
|
);
|
|
}
|
|
}
|