From 641e6ed336ea2939f6a3d9bb7019391dac34685a Mon Sep 17 00:00:00 2001 From: aude Date: Tue, 22 Sep 2015 16:54:58 +0200 Subject: [PATCH] Also check Kafka class exists in KafkaHandlerTest I have monolog installed but not Kafka, so still the test was run and broken for me. Change-Id: If396815d77b0ae25fbd5c16b628f217478062b43 --- .../includes/debug/logger/monolog/KafkaHandlerTest.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/includes/debug/logger/monolog/KafkaHandlerTest.php b/tests/phpunit/includes/debug/logger/monolog/KafkaHandlerTest.php index 3cf1ee6627..b6f33d81d9 100644 --- a/tests/phpunit/includes/debug/logger/monolog/KafkaHandlerTest.php +++ b/tests/phpunit/includes/debug/logger/monolog/KafkaHandlerTest.php @@ -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(); } -- 2.20.1