Merge "jquery.accessKeyLabel: make modifier info public"
[lhc/web/wiklou.git] / tests / phpunit / includes / debug / logger / monolog / KafkaHandlerTest.php
index 3cf1ee6..d2b267a 100644 (file)
@@ -24,14 +24,17 @@ use MediaWikiTestCase;
 use Monolog\Logger;
 
 // not available in the version of phpunit mw uses, so copied into repo
-require_once __DIR__ . '/../../../ConsecutiveParametersMatcher.php';
+require_once __DIR__ . '/../../../phpunit/ConsecutiveParametersMatcher.php';
 
 class KafkaHandlerTest extends MediaWikiTestCase {
 
-       public function setUp() {
-               if ( !class_exists( 'Monolog\Handler\AbstractProcessingHandler' ) ) {
-                       $this->markTestSkipped( 'Monolog is required for the KafkaHandlerTest' );
+       protected function setUp() {
+               if ( !class_exists( 'Monolog\Handler\AbstractProcessingHandler' )
+                       || !class_exists( 'Kafka\Produce' )
+               ) {
+                       $this->markTestSkipped( 'Monolog and Kafka are required for the KafkaHandlerTest' );
                }
+
                parent::setUp();
        }
 
@@ -49,10 +52,10 @@ class KafkaHandlerTest extends MediaWikiTestCase {
                $produce = $this->getMockBuilder( 'Kafka\Produce' )
                        ->disableOriginalConstructor()
                        ->getMock();
-               $produce->expects($this->any())
-                       ->method('getAvailablePartitions')
-                       ->will($this->returnValue( array( 'A' ) ) );
-               $produce->expects($this->once())
+               $produce->expects( $this->any() )
+                       ->method( 'getAvailablePartitions' )
+                       ->will( $this->returnValue( array( 'A' ) ) );
+               $produce->expects( $this->once() )
                        ->method( 'setMessages' )
                        ->with( $expect, $this->anything(), $this->anything() );
 
@@ -164,7 +167,6 @@ class KafkaHandlerTest extends MediaWikiTestCase {
                }
        }
 
-
        public function testBatchHandlesNullFormatterResult() {
                $produce = $this->getMockBuilder( 'Kafka\Produce' )
                        ->disableOriginalConstructor()