From fa1123a012ad03d75f013d20e8c35175dd0e9397 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Sun, 30 Aug 2015 23:42:56 -0700 Subject: [PATCH] Skip monolog tests if monolog is not installed Change-Id: Ib3f4f76651da183901634a0ac6787666e47d74d4 --- .../includes/debug/logger/monolog/LineFormatterTest.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/phpunit/includes/debug/logger/monolog/LineFormatterTest.php b/tests/phpunit/includes/debug/logger/monolog/LineFormatterTest.php index 05c32a0463..f12cf5bd80 100644 --- a/tests/phpunit/includes/debug/logger/monolog/LineFormatterTest.php +++ b/tests/phpunit/includes/debug/logger/monolog/LineFormatterTest.php @@ -28,6 +28,13 @@ use TestingAccessWrapper; class LineFormatterTest extends MediaWikiTestCase { + public function setUp() { + if ( !class_exists( 'Monolog\Formatter\LineFormatter' ) ) { + $this->markTestSkipped( 'This test requires monolog to be installed' ); + } + parent::setUp(); + } + /** * @covers LineFormatter::normalizeException */ -- 2.20.1