for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Koded\Logging\Processors;
use Koded\Logging\Logger;
use PHPUnit\Framework\TestCase;
class DefaultProcessorPropertiesTest extends TestCase
{
public function test_defaults()
$processor = new Memory([]);
$this->assertAttributeSame(-1, 'levels', $processor);
$this->assertAttributeSame('timestamp [levelname]: message', 'format', $processor);
$this->assertAttributeSame('', 'formatted', $processor);
}
public function test_constructor_settings()
$processor = new Memory([
'levels' => Logger::ALERT | Logger::NOTICE | Logger::WARNING,
'format' => '[level] message'
]);
$this->assertSame(50, $processor->levels());
$this->assertAttributeSame('[level] message', 'format', $processor);