From 940cbe15abe36924e5693abb585215bb322686a7 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Sat, 4 Oct 2014 16:43:06 +0100 Subject: [PATCH] Move the class off in the tests --- src/Monolog/Handler/ExceptionTestHandler.php | 34 ------------------- .../Handler/WhatFailureGroupHandlerTest.php | 12 +++++++ 2 files changed, 12 insertions(+), 34 deletions(-) delete mode 100644 src/Monolog/Handler/ExceptionTestHandler.php diff --git a/src/Monolog/Handler/ExceptionTestHandler.php b/src/Monolog/Handler/ExceptionTestHandler.php deleted file mode 100644 index f16db609..00000000 --- a/src/Monolog/Handler/ExceptionTestHandler.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * 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 - */ -class ExceptionTestHandler extends TestHandler -{ - /** - * {@inheritdoc} - */ - public function handle(array $record) { - $return = parent::handle($record); - throw new \Exception("ExceptionTestHandler::handle"); - } -} diff --git a/tests/Monolog/Handler/WhatFailureGroupHandlerTest.php b/tests/Monolog/Handler/WhatFailureGroupHandlerTest.php index 29508afa..91251bf1 100644 --- a/tests/Monolog/Handler/WhatFailureGroupHandlerTest.php +++ b/tests/Monolog/Handler/WhatFailureGroupHandlerTest.php @@ -105,3 +105,15 @@ class WhatFailureGroupHandlerTest extends TestCase $this->assertTrue($records[0]['extra']['foo']); } } + +class ExceptionTestHandler extends TestHandler +{ + /** + * {@inheritdoc} + */ + public function handle(array $record) { + parent::handle($record); + + throw new \Exception("ExceptionTestHandler::handle"); + } +}