Skip monolog tests if monolog is not installed
authorKunal Mehta <legoktm@gmail.com>
Mon, 31 Aug 2015 06:42:56 +0000 (23:42 -0700)
committerKunal Mehta <legoktm@gmail.com>
Mon, 31 Aug 2015 06:42:56 +0000 (23:42 -0700)
Change-Id: Ib3f4f76651da183901634a0ac6787666e47d74d4

tests/phpunit/includes/debug/logger/monolog/LineFormatterTest.php

index 05c32a0..f12cf5b 100644 (file)
@@ -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
         */