wiki.techinc.nl/tests/phpunit/includes/specials/SpecialUploadTest.php
Matthias Mullie 17fcfd8eaa Only add header when description not already has it
Bug: T187302
Change-Id: Ic57196cc366fc53d83c624a7cd9290fb1972eab1
2018-02-21 17:32:48 +00:00

29 lines
672 B
PHP

<?php
class SpecialUploadTest extends MediaWikiTestCase {
/**
* @covers SpecialUpload::getInitialPageText
* @dataProvider provideGetInitialPageText
*/
public function testGetInitialPageText( $expected, $inputParams ) {
$result = call_user_func_array( [ 'SpecialUpload', 'getInitialPageText' ], $inputParams );
$this->assertEquals( $expected, $result );
}
public function provideGetInitialPageText() {
return [
[
'expect' => "== Summary ==\nthis is a test\n",
'params' => [
'this is a test'
],
],
[
'expect' => "== Summary ==\nthis is a test\n",
'params' => [
"== Summary ==\nthis is a test",
],
],
];
}
}