*/
class ParserTest {
/**
- * boolean $color whereas output should be colorized
+ * @var bool $color whereas output should be colorized
*/
private $color;
/**
- * boolean $showOutput Show test output
+ * @var bool $showOutput Show test output
*/
private $showOutput;
/**
- * boolean $useTemporaryTables Use temporary tables for the temporary database
+ * @var bool $useTemporaryTables Use temporary tables for the temporary database
*/
private $useTemporaryTables = true;
/**
- * boolean $databaseSetupDone True if the database has been set up
+ * @var bool $databaseSetupDone True if the database has been set up
*/
private $databaseSetupDone = false;
private $dbClone;
/**
- * string $oldTablePrefix Original table prefix
+ * @var string $oldTablePrefix Original table prefix
*/
private $oldTablePrefix;
/**
* Get a Parser object
+ *
+ * @param string $preprocessor
+ * @return Parser
*/
function getParser( $preprocessor = null ) {
global $wgParserConf;
$out = $parser->getPreloadText( $input, $title, $options );
} else {
$output = $parser->parse( $input, $title, $options, true, true, 1337 );
+ $output->setTOCEnabled( !isset( $opts['notoc'] ) );
$out = $output->getText();
if ( isset( $opts['showtitle'] ) ) {
/**
* Use a regex to find out the value of an option
* @param $key String: name of option val to retrieve
- * @param $opts Options array to look in
+ * @param $opts array: Options array to look in
* @param $default Mixed: default value returned if not found
*/
private static function getOptionValue( $key, $opts, $default ) {