mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-06 13:16:39 +02:00
Move the class off in the tests
This commit is contained in:
@@ -1,34 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This file is part of the Monolog package.
|
|
||||||
*
|
|
||||||
* (c) Jordi Boggiano <j.boggiano@seld.be>
|
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the LICENSE
|
|
||||||
* file that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace Monolog\Handler;
|
|
||||||
|
|
||||||
use Monolog\Logger;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Used for testing purposes.
|
|
||||||
*
|
|
||||||
* It records all records and gives you access to them for verification. It
|
|
||||||
* throws an exception from handle and handleBatch to test the
|
|
||||||
* WhatFailureGroupHandler Class.
|
|
||||||
*
|
|
||||||
* @author Craig D'Amelio <craig@damelio.ca>
|
|
||||||
*/
|
|
||||||
class ExceptionTestHandler extends TestHandler
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
public function handle(array $record) {
|
|
||||||
$return = parent::handle($record);
|
|
||||||
throw new \Exception("ExceptionTestHandler::handle");
|
|
||||||
}
|
|
||||||
}
|
|
@@ -105,3 +105,15 @@ class WhatFailureGroupHandlerTest extends TestCase
|
|||||||
$this->assertTrue($records[0]['extra']['foo']);
|
$this->assertTrue($records[0]['extra']['foo']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class ExceptionTestHandler extends TestHandler
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function handle(array $record) {
|
||||||
|
parent::handle($record);
|
||||||
|
|
||||||
|
throw new \Exception("ExceptionTestHandler::handle");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user