gplx/mediawiki/tests/phpunit/unit/includes/CommentFormatter/CommentFormatterTestUtils.php

26 lines
405 B
PHP

<?php
namespace MediaWiki\Tests\Unit\CommentFormatter;
class CommentFormatterTestUtils {
public static function dumpArray( $a ) {
$s = '';
foreach ( $a as $k => $v ) {
if ( $v === null ) {
continue;
}
if ( $s !== '' ) {
$s .= ', ';
}
if ( $v === true ) {
$s .= $k;
} elseif ( $v === false ) {
$s .= "!$k";
} else {
$s .= "$k=$v";
}
}
return $s;
}
}