createNoOpMock( ParserOptions::class, [ 'optionsHash' ] ); $options->method( 'optionsHash' )->willReturnOnConsecutiveCalls( $hashOne, $hashTwo ); $content = new DummyContentForTesting( "hello world" ); $output = new ParserOutput(); $observer = new ParserObserver( $logger ); $observer->notifyParse( $title, null, $options, $content, $output ); $observer->notifyParse( $title, null, $options, $content, $output ); $this->assertArrayEquals( $expects, $logger->getBuffer() ); } public static function provideDuplicateParse() { yield [ 'foo', 'bar', [] ]; yield [ 'foo', 'foo', [ [ 'debug', 'MediaWiki\Parser\ParserObserver::notifyParse: Possibly redundant parse!' ] ] ]; } }