mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-03 11:47:38 +02:00
Made the write method protected
Tests are not a good reason to make it public.
This commit is contained in:
@@ -69,6 +69,7 @@ abstract class AbstractHandler implements HandlerInterface
|
|||||||
$record = $this->formatter->format($record);
|
$record = $this->formatter->format($record);
|
||||||
|
|
||||||
$this->write($record);
|
$this->write($record);
|
||||||
|
|
||||||
return false === $this->bubble;
|
return false === $this->bubble;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -82,14 +83,6 @@ abstract class AbstractHandler implements HandlerInterface
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Writes the record down to the log of the implementing handler
|
|
||||||
*
|
|
||||||
* @param array $record
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
abstract public function write(array $record);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Closes the handler.
|
* Closes the handler.
|
||||||
*
|
*
|
||||||
@@ -178,6 +171,14 @@ abstract class AbstractHandler implements HandlerInterface
|
|||||||
$this->close();
|
$this->close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Writes the record down to the log of the implementing handler
|
||||||
|
*
|
||||||
|
* @param array $record
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
abstract protected function write(array $record);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the default formatter.
|
* Gets the default formatter.
|
||||||
*
|
*
|
||||||
|
@@ -63,7 +63,7 @@ class BufferHandler extends AbstractHandler
|
|||||||
/**
|
/**
|
||||||
* Implemented to comply with the AbstractHandler requirements. Can not be called.
|
* Implemented to comply with the AbstractHandler requirements. Can not be called.
|
||||||
*/
|
*/
|
||||||
public function write(array $record)
|
protected function write(array $record)
|
||||||
{
|
{
|
||||||
throw new \BadMethodCallException('This method should not be called directly on the FingersCrossedHandler.');
|
throw new \BadMethodCallException('This method should not be called directly on the FingersCrossedHandler.');
|
||||||
}
|
}
|
||||||
|
@@ -85,7 +85,7 @@ class FingersCrossedHandler extends AbstractHandler
|
|||||||
/**
|
/**
|
||||||
* Implemented to comply with the AbstractHandler requirements. Can not be called.
|
* Implemented to comply with the AbstractHandler requirements. Can not be called.
|
||||||
*/
|
*/
|
||||||
public function write(array $record)
|
protected function write(array $record)
|
||||||
{
|
{
|
||||||
throw new \BadMethodCallException('This method should not be called directly on the FingersCrossedHandler.');
|
throw new \BadMethodCallException('This method should not be called directly on the FingersCrossedHandler.');
|
||||||
}
|
}
|
||||||
|
@@ -38,7 +38,7 @@ class NullHandler extends AbstractHandler
|
|||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function write(array $record)
|
protected function write(array $record)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -52,19 +52,6 @@ class RotatingFileHandler extends StreamHandler
|
|||||||
parent::__construct($timedFilename, $level, $bubble);
|
parent::__construct($timedFilename, $level, $bubble);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
public function write(array $record)
|
|
||||||
{
|
|
||||||
// on the first record written, if the log is new, we should rotate (once per day)
|
|
||||||
if (null === $this->mustRotate) {
|
|
||||||
$this->mustRotate = !file_exists($this->url);
|
|
||||||
}
|
|
||||||
|
|
||||||
parent::write($record);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
@@ -77,6 +64,19 @@ class RotatingFileHandler extends StreamHandler
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
protected function write(array $record)
|
||||||
|
{
|
||||||
|
// on the first record written, if the log is new, we should rotate (once per day)
|
||||||
|
if (null === $this->mustRotate) {
|
||||||
|
$this->mustRotate = !file_exists($this->url);
|
||||||
|
}
|
||||||
|
|
||||||
|
parent::write($record);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Rotates the files.
|
* Rotates the files.
|
||||||
*/
|
*/
|
||||||
|
@@ -41,24 +41,6 @@ class StreamHandler extends AbstractHandler
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
public function write(array $record)
|
|
||||||
{
|
|
||||||
if (null === $this->stream) {
|
|
||||||
if (!$this->url) {
|
|
||||||
throw new \LogicException('Missing stream url, the stream can not be opened. This may be caused by a premature call to close().');
|
|
||||||
}
|
|
||||||
$this->stream = fopen($this->url, 'a');
|
|
||||||
if (!is_resource($this->stream)) {
|
|
||||||
$this->stream = null;
|
|
||||||
throw new \UnexpectedValueException('The stream could not be opened, "'.$this->url.'" may be an invalid url.');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
fwrite($this->stream, (string) $record['message']);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
@@ -69,4 +51,22 @@ class StreamHandler extends AbstractHandler
|
|||||||
$this->stream = null;
|
$this->stream = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
protected function write(array $record)
|
||||||
|
{
|
||||||
|
if (null === $this->stream) {
|
||||||
|
if (!$this->url) {
|
||||||
|
throw new \LogicException('Missing stream url, the stream can not be opened. This may be caused by a premature call to close().');
|
||||||
|
}
|
||||||
|
$this->stream = @fopen($this->url, 'a');
|
||||||
|
if (!is_resource($this->stream)) {
|
||||||
|
$this->stream = null;
|
||||||
|
throw new \UnexpectedValueException('The stream could not be opened, "'.$this->url.'" may be an invalid url.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fwrite($this->stream, (string) $record['message']);
|
||||||
|
}
|
||||||
}
|
}
|
@@ -93,16 +93,16 @@ class SyslogHandler extends AbstractHandler
|
|||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function write(array $record)
|
public function close()
|
||||||
{
|
{
|
||||||
syslog($this->logLevels[$record['level']], (string) $record['message']);
|
closelog();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function close()
|
protected function write(array $record)
|
||||||
{
|
{
|
||||||
closelog();
|
syslog($this->logLevels[$record['level']], (string) $record['message']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -89,7 +89,7 @@ class TestHandler extends AbstractHandler
|
|||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function write(array $record)
|
protected function write(array $record)
|
||||||
{
|
{
|
||||||
$this->recordsByLevel[$record['level']][] = $record;
|
$this->recordsByLevel[$record['level']][] = $record;
|
||||||
$this->records[] = $record;
|
$this->records[] = $record;
|
||||||
|
@@ -11,50 +11,39 @@
|
|||||||
|
|
||||||
namespace Monolog\Handler;
|
namespace Monolog\Handler;
|
||||||
|
|
||||||
|
use Monolog\TestCase;
|
||||||
use Monolog\Logger;
|
use Monolog\Logger;
|
||||||
|
|
||||||
class AbstractHandlerTest extends \PHPUnit_Framework_TestCase
|
class AbstractHandlerTest extends TestCase
|
||||||
{
|
{
|
||||||
public function testHandle()
|
public function testHandle()
|
||||||
{
|
{
|
||||||
$handler = new TestHandler();
|
$handler = new TestHandler();
|
||||||
$this->assertTrue($handler->handle($this->getMessage()));
|
$this->assertTrue($handler->handle($this->getRecord()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testHandleLowerLevelMessage()
|
public function testHandleLowerLevelMessage()
|
||||||
{
|
{
|
||||||
$handler = new TestHandler(Logger::WARNING);
|
$handler = new TestHandler(Logger::WARNING);
|
||||||
$this->assertFalse($handler->handle($this->getMessage(Logger::DEBUG)));
|
$this->assertFalse($handler->handle($this->getRecord(Logger::DEBUG)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testHandleBubbling()
|
public function testHandleBubbling()
|
||||||
{
|
{
|
||||||
$handler = new TestHandler(Logger::DEBUG, true);
|
$handler = new TestHandler(Logger::DEBUG, true);
|
||||||
$this->assertFalse($handler->handle($this->getMessage()));
|
$this->assertFalse($handler->handle($this->getRecord()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testHandleNotBubbling()
|
public function testHandleNotBubbling()
|
||||||
{
|
{
|
||||||
$handler = new TestHandler(Logger::DEBUG);
|
$handler = new TestHandler(Logger::DEBUG);
|
||||||
$this->assertTrue($handler->handle($this->getMessage()));
|
$this->assertTrue($handler->handle($this->getRecord()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIsHandling()
|
public function testIsHandling()
|
||||||
{
|
{
|
||||||
$handler = new TestHandler(Logger::WARNING);
|
$handler = new TestHandler(Logger::WARNING);
|
||||||
$this->assertTrue($handler->handle($this->getMessage()));
|
$this->assertTrue($handler->handle($this->getRecord()));
|
||||||
$this->assertFalse($handler->handle($this->getMessage(Logger::DEBUG)));
|
$this->assertFalse($handler->handle($this->getRecord(Logger::DEBUG)));
|
||||||
}
|
|
||||||
|
|
||||||
protected function getMessage($level = Logger::WARNING)
|
|
||||||
{
|
|
||||||
return array(
|
|
||||||
'level' => $level,
|
|
||||||
'level_name' => Logger::getLevelName($level),
|
|
||||||
'channel' => 'log',
|
|
||||||
'message' => 'foo',
|
|
||||||
'datetime' => new \DateTime,
|
|
||||||
'extra' => array(),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -11,9 +11,10 @@
|
|||||||
|
|
||||||
namespace Monolog\Handler;
|
namespace Monolog\Handler;
|
||||||
|
|
||||||
|
use Monolog\TestCase;
|
||||||
use Monolog\Logger;
|
use Monolog\Logger;
|
||||||
|
|
||||||
class BufferHandlerTest extends \PHPUnit_Framework_TestCase
|
class BufferHandlerTest extends TestCase
|
||||||
{
|
{
|
||||||
public function testHandleBuffers()
|
public function testHandleBuffers()
|
||||||
{
|
{
|
||||||
@@ -52,16 +53,4 @@ class BufferHandlerTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue($test->hasInfoRecords());
|
$this->assertTrue($test->hasInfoRecords());
|
||||||
$this->assertFalse($test->hasDebugRecords());
|
$this->assertFalse($test->hasDebugRecords());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getRecord($level = Logger::WARNING)
|
|
||||||
{
|
|
||||||
return array(
|
|
||||||
'level' => $level,
|
|
||||||
'level_name' => Logger::getLevelName($level),
|
|
||||||
'channel' => 'log',
|
|
||||||
'Record' => 'foo',
|
|
||||||
'datetime' => new \DateTime,
|
|
||||||
'extra' => array(),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -11,9 +11,10 @@
|
|||||||
|
|
||||||
namespace Monolog\Handler;
|
namespace Monolog\Handler;
|
||||||
|
|
||||||
|
use Monolog\TestCase;
|
||||||
use Monolog\Logger;
|
use Monolog\Logger;
|
||||||
|
|
||||||
class FingersCrossedHandlerTest extends \PHPUnit_Framework_TestCase
|
class FingersCrossedHandlerTest extends TestCase
|
||||||
{
|
{
|
||||||
public function testHandleBuffers()
|
public function testHandleBuffers()
|
||||||
{
|
{
|
||||||
@@ -76,16 +77,4 @@ class FingersCrossedHandlerTest extends \PHPUnit_Framework_TestCase
|
|||||||
});
|
});
|
||||||
$handler->handle($this->getRecord(Logger::WARNING));
|
$handler->handle($this->getRecord(Logger::WARNING));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getRecord($level = Logger::WARNING)
|
|
||||||
{
|
|
||||||
return array(
|
|
||||||
'level' => $level,
|
|
||||||
'level_name' => Logger::getLevelName($level),
|
|
||||||
'channel' => 'log',
|
|
||||||
'Record' => 'foo',
|
|
||||||
'datetime' => new \DateTime,
|
|
||||||
'extra' => array(),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -11,9 +11,10 @@
|
|||||||
|
|
||||||
namespace Monolog\Handler;
|
namespace Monolog\Handler;
|
||||||
|
|
||||||
|
use Monolog\TestCase;
|
||||||
use Monolog\Logger;
|
use Monolog\Logger;
|
||||||
|
|
||||||
class NullHandlerTest extends \PHPUnit_Framework_TestCase
|
class NullHandlerTest extends TestCase
|
||||||
{
|
{
|
||||||
public function testHandle()
|
public function testHandle()
|
||||||
{
|
{
|
||||||
@@ -26,20 +27,4 @@ class NullHandlerTest extends \PHPUnit_Framework_TestCase
|
|||||||
$handler = new NullHandler(Logger::WARNING);
|
$handler = new NullHandler(Logger::WARNING);
|
||||||
$this->assertFalse($handler->handle($this->getRecord(Logger::DEBUG)));
|
$this->assertFalse($handler->handle($this->getRecord(Logger::DEBUG)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* No-op test for coverage
|
|
||||||
*/
|
|
||||||
public function testWrite()
|
|
||||||
{
|
|
||||||
$handler = new NullHandler();
|
|
||||||
$handler->write($this->getRecord());
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function getRecord($level = Logger::WARNING)
|
|
||||||
{
|
|
||||||
return array(
|
|
||||||
'level' => $level,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
@@ -11,9 +11,10 @@
|
|||||||
|
|
||||||
namespace Monolog\Handler;
|
namespace Monolog\Handler;
|
||||||
|
|
||||||
|
use Monolog\TestCase;
|
||||||
use Monolog\Logger;
|
use Monolog\Logger;
|
||||||
|
|
||||||
class RotatingFileHandlerTest extends \PHPUnit_Framework_TestCase
|
class RotatingFileHandlerTest extends TestCase
|
||||||
{
|
{
|
||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
@@ -29,7 +30,8 @@ class RotatingFileHandlerTest extends \PHPUnit_Framework_TestCase
|
|||||||
touch(__DIR__.'/Fixtures/foo-'.date('Y-m-d', time() - 86400).'.rot');
|
touch(__DIR__.'/Fixtures/foo-'.date('Y-m-d', time() - 86400).'.rot');
|
||||||
|
|
||||||
$handler = new RotatingFileHandler(__DIR__.'/Fixtures/foo.rot');
|
$handler = new RotatingFileHandler(__DIR__.'/Fixtures/foo.rot');
|
||||||
$handler->write(array('message' => 'test'));
|
$handler->setFormatter($this->getIdentityFormatter());
|
||||||
|
$handler->handle($this->getRecord());
|
||||||
|
|
||||||
$log = __DIR__.'/Fixtures/foo-'.date('Y-m-d').'.rot';
|
$log = __DIR__.'/Fixtures/foo-'.date('Y-m-d').'.rot';
|
||||||
$this->assertTrue(file_exists($log));
|
$this->assertTrue(file_exists($log));
|
||||||
@@ -53,7 +55,8 @@ class RotatingFileHandlerTest extends \PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
$handler = new RotatingFileHandler(__DIR__.'/Fixtures/foo.rot', 2);
|
$handler = new RotatingFileHandler(__DIR__.'/Fixtures/foo.rot', 2);
|
||||||
$handler->write(array('message' => 'test'));
|
$handler->setFormatter($this->getIdentityFormatter());
|
||||||
|
$handler->handle($this->getRecord());
|
||||||
|
|
||||||
$handler->close();
|
$handler->close();
|
||||||
|
|
||||||
@@ -80,7 +83,8 @@ class RotatingFileHandlerTest extends \PHPUnit_Framework_TestCase
|
|||||||
$log = __DIR__.'/Fixtures/foo-'.date('Y-m-d').'.rot';
|
$log = __DIR__.'/Fixtures/foo-'.date('Y-m-d').'.rot';
|
||||||
file_put_contents($log, "foo");
|
file_put_contents($log, "foo");
|
||||||
$handler = new RotatingFileHandler(__DIR__.'/Fixtures/foo.rot');
|
$handler = new RotatingFileHandler(__DIR__.'/Fixtures/foo.rot');
|
||||||
$handler->write(array('message' => 'test'));
|
$handler->setFormatter($this->getIdentityFormatter());
|
||||||
|
$handler->handle($this->getRecord());
|
||||||
$this->assertEquals('footest', file_get_contents($log));
|
$this->assertEquals('footest', file_get_contents($log));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -11,17 +11,19 @@
|
|||||||
|
|
||||||
namespace Monolog\Handler;
|
namespace Monolog\Handler;
|
||||||
|
|
||||||
|
use Monolog\TestCase;
|
||||||
use Monolog\Logger;
|
use Monolog\Logger;
|
||||||
|
|
||||||
class StreamHandlerTest extends \PHPUnit_Framework_TestCase
|
class StreamHandlerTest extends TestCase
|
||||||
{
|
{
|
||||||
public function testWrite()
|
public function testHandle()
|
||||||
{
|
{
|
||||||
$handle = fopen('php://memory', 'a+');
|
$handle = fopen('php://memory', 'a+');
|
||||||
$handler = new StreamHandler($handle);
|
$handler = new StreamHandler($handle);
|
||||||
$handler->write(array('message' => 'test'));
|
$handler->setFormatter($this->getIdentityFormatter());
|
||||||
$handler->write(array('message' => 'test2'));
|
$handler->handle($this->getRecord(Logger::WARNING, 'test'));
|
||||||
$handler->write(array('message' => 'test3'));
|
$handler->handle($this->getRecord(Logger::WARNING, 'test2'));
|
||||||
|
$handler->handle($this->getRecord(Logger::WARNING, 'test3'));
|
||||||
fseek($handle, 0);
|
fseek($handle, 0);
|
||||||
$this->assertEquals('testtest2test3', fread($handle, 100));
|
$this->assertEquals('testtest2test3', fread($handle, 100));
|
||||||
}
|
}
|
||||||
@@ -35,27 +37,27 @@ class StreamHandlerTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertFalse(is_resource($handle));
|
$this->assertFalse(is_resource($handle));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testWriteCreatesTheStreamResource()
|
public function testHandleCreatesTheStreamResource()
|
||||||
{
|
{
|
||||||
$handler = new StreamHandler('php://memory');
|
$handler = new StreamHandler('php://memory');
|
||||||
$handler->write(array('message' => 'test'));
|
$handler->handle($this->getRecord());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @expectedException LogicException
|
* @expectedException LogicException
|
||||||
*/
|
*/
|
||||||
public function testWriteMissingResource()
|
public function testHandleMissingResource()
|
||||||
{
|
{
|
||||||
$handler = new StreamHandler(null);
|
$handler = new StreamHandler(null);
|
||||||
$handler->write(array('message' => 'test'));
|
$handler->handle($this->getRecord());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @expectedException UnexpectedValueException
|
* @expectedException UnexpectedValueException
|
||||||
*/
|
*/
|
||||||
public function testWriteInvalidResource()
|
public function testHandleInvalidResource()
|
||||||
{
|
{
|
||||||
$handler = new StreamHandler('bogus://url');
|
$handler = new StreamHandler('bogus://url');
|
||||||
@$handler->write(array('message' => 'test'));
|
$handler->handle($this->getRecord());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
40
tests/Monolog/TestCase.php
Normal file
40
tests/Monolog/TestCase.php
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of the Symfony package.
|
||||||
|
*
|
||||||
|
* (c) Fabien Potencier <fabien@symfony.com>
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Monolog;
|
||||||
|
|
||||||
|
class TestCase extends \PHPUnit_Framework_TestCase
|
||||||
|
{
|
||||||
|
protected function getRecord($level = Logger::WARNING, $message = 'test')
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'message' => $message,
|
||||||
|
'level' => $level,
|
||||||
|
'level_name' => Logger::getLevelName($level),
|
||||||
|
'channel' => 'test',
|
||||||
|
'datetime' => new \DateTime(),
|
||||||
|
'extra' => array(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Monolog\Formatter\FormatterInterface
|
||||||
|
*/
|
||||||
|
protected function getIdentityFormatter()
|
||||||
|
{
|
||||||
|
$formatter = $this->getMock('Monolog\\Formatter\\FormatterInterface');
|
||||||
|
$formatter->expects($this->any())
|
||||||
|
->method('format')
|
||||||
|
->will($this->returnArgument(0));
|
||||||
|
|
||||||
|
return $formatter;
|
||||||
|
}
|
||||||
|
}
|
@@ -9,6 +9,8 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
require_once __DIR__.'/Monolog/TestCase.php';
|
||||||
|
|
||||||
spl_autoload_register(function($class)
|
spl_autoload_register(function($class)
|
||||||
{
|
{
|
||||||
$file = __DIR__.'/../src/'.strtr($class, '\\', '/').'.php';
|
$file = __DIR__.'/../src/'.strtr($class, '\\', '/').'.php';
|
||||||
|
Reference in New Issue
Block a user