2018-10-26 22:42:26 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace MediaWiki\Edit;
|
|
|
|
|
|
|
|
|
|
use ParserOutput;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers \MediaWiki\Edit\PreparedEdit
|
|
|
|
|
*/
|
2019-06-30 13:23:53 +00:00
|
|
|
class PreparedEditTest extends \MediaWikiUnitTestCase {
|
2019-10-09 18:24:07 +00:00
|
|
|
public function testCallback() {
|
2018-10-26 22:42:26 +00:00
|
|
|
$output = new ParserOutput();
|
|
|
|
|
$edit = new PreparedEdit();
|
2021-02-06 19:30:20 +00:00
|
|
|
$edit->parserOutputCallback = static function () {
|
2018-10-26 22:42:26 +00:00
|
|
|
return new ParserOutput();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
$this->assertEquals( $output, $edit->getOutput() );
|
|
|
|
|
$this->assertEquals( $output, $edit->output );
|
|
|
|
|
}
|
|
|
|
|
}
|