Page MenuHomeWickedGov Phorge

MockTemplateParser.php
No OneTemporary

Size
775 B
Referenced Files
None
Subscribers
None

MockTemplateParser.php

<?php
namespace MediaWiki\CheckUser\Tests\Integration\CheckUser\Pagers\Mocks;
use MediaWiki\Html\TemplateParser;
class MockTemplateParser extends TemplateParser {
/**
* @var array|null the parameters provided on the last call to processTemplate.
*/
public $lastCalledWith;
/**
* Mocked processTemplate that returns an empty string.
* Does not test the actual processing of the template
* but used to unit test the formatRow by validating
* that the template parameters are as expected.
*
* It saves the arguments from the last call to a
* property for later access.
*
* @inheritDoc
*/
public function processTemplate( $templateName, $args, array $scopes = [] ) {
$this->lastCalledWith = [ $templateName, $args, $scopes ];
return '';
}
}

File Metadata

Mime Type
text/x-php
Expires
Sun, Nov 22, 02:51 (1 d, 11 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
06/e9/0e7091bb46624f77a123d1b5a360
Default Alt Text
MockTemplateParser.php (775 B)

Event Timeline