diff --git a/tests/Monolog/Handler/GelfHandlerLegacyTest.php b/tests/Monolog/Handler/GelfHandlerLegacyTest.php index d60a6db3..50cb7cfe 100644 --- a/tests/Monolog/Handler/GelfHandlerLegacyTest.php +++ b/tests/Monolog/Handler/GelfHandlerLegacyTest.php @@ -23,6 +23,8 @@ class GelfHandlerLegacyTest extends TestCase if (!class_exists('Gelf\MessagePublisher') || !class_exists('Gelf\Message')) { $this->markTestSkipped("mlehner/gelf-php not installed"); } + + require_once __DIR__ . '/GelfMocks.php'; } /** diff --git a/tests/Monolog/Handler/GelfMocks.php b/tests/Monolog/Handler/GelfMocks.php new file mode 100644 index 00000000..dda87114 --- /dev/null +++ b/tests/Monolog/Handler/GelfMocks.php @@ -0,0 +1,25 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Gelf\MessagePublisher; +use Gelf\Message; + +class MockMessagePublisher extends MessagePublisher +{ + public function publish(Message $message) + { + $this->lastMessage = $message; + } + + public $lastMessage = null; +}