Merge "registration: Only allow one extension to set a specific config setting"
[lhc/web/wiklou.git] / tests / phpunit / includes / logging / LogFormatterTestCase.php
index f175482..2dc9a2c 100644 (file)
@@ -29,7 +29,7 @@ abstract class LogFormatterTestCase extends MediaWikiLangTestCase {
        }
 
        protected function expandDatabaseRow( $data, $legacy ) {
-               return array(
+               return [
                        // no log_id because no insert in database
                        'log_type' => $data['type'],
                        'log_action' => $data['action'],
@@ -39,18 +39,19 @@ abstract class LogFormatterTestCase extends MediaWikiLangTestCase {
                        'log_namespace' => isset( $data['namespace'] ) ? $data['namespace'] : NS_MAIN,
                        'log_title' => isset( $data['title'] ) ? $data['title'] : 'Main_Page',
                        'log_page' => isset( $data['page'] ) ? $data['page'] : 0,
-                       'log_comment' => isset( $data['comment'] ) ? $data['comment'] : '',
+                       'log_comment_text' => isset( $data['comment'] ) ? $data['comment'] : '',
+                       'log_comment_data' => null,
                        'log_params' => $legacy
                                ? LogPage::makeParamBlob( $data['params'] )
                                : LogEntryBase::makeParamBlob( $data['params'] ),
                        'log_deleted' => isset( $data['deleted'] ) ? $data['deleted'] : 0,
-               );
+               ];
        }
 
        private static function removeSomeHtml( $html ) {
                $html = str_replace( '"', '"', $html );
                $html = preg_replace( '/\xE2\x80[\x8E\x8F]/', '', $html ); // Strip lrm/rlm
-               return trim( preg_replace( '/<(a|span)[^>]*>([^<]*)<\/\1>/', '$2', $html ) );
+               return trim( strip_tags( $html ) );
        }
 
        private static function removeApiMetaData( $val ) {