Also check Kafka class exists in KafkaHandlerTest
authoraude <aude.wiki@gmail.com>
Tue, 22 Sep 2015 14:54:58 +0000 (16:54 +0200)
committeraude <aude.wiki@gmail.com>
Tue, 22 Sep 2015 14:54:58 +0000 (16:54 +0200)
I have monolog installed but not Kafka, so still
the test was run and broken for me.

Change-Id: If396815d77b0ae25fbd5c16b628f217478062b43

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

index 3cf1ee6..b6f33d8 100644 (file)
@@ -29,9 +29,12 @@ require_once __DIR__ . '/../../../ConsecutiveParametersMatcher.php';
 class KafkaHandlerTest extends MediaWikiTestCase {
 
        public function setUp() {
-               if ( !class_exists( 'Monolog\Handler\AbstractProcessingHandler' ) ) {
-                       $this->markTestSkipped( 'Monolog is required for the KafkaHandlerTest' );
+               if ( !class_exists( 'Monolog\Handler\AbstractProcessingHandler' )
+                       || !class_exists( 'Kafka\Produce' )
+               ) {
+                       $this->markTestSkipped( 'Monolog and Kafka are required for the KafkaHandlerTest' );
                }
+
                parent::setUp();
        }