aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/htmlform/HTMLFormTest.php
diff options
context:
space:
mode:
authorGergő Tisza <tgr.huwiki@gmail.com>2022-01-02 20:34:35 -0800
committerGergő Tisza <tgr.huwiki@gmail.com>2022-01-02 21:51:48 -0800
commit499af9ccbed726668d2620fdbde56b55dfb4559d (patch)
treef4ab98edf5f618fe4e83589b2717af1bad1b4b4f /tests/phpunit/includes/htmlform/HTMLFormTest.php
parent6917ca4a7b5eba7036921645b22c9e7e9acbc894 (diff)
downloadmediawikicore-499af9ccbed726668d2620fdbde56b55dfb4559d.tar.gz
mediawikicore-499af9ccbed726668d2620fdbde56b55dfb4559d.zip
Rename HTMLForm::[get|set|add]*Text() methods
Rename HTMLForm::[get|set|add][Pre|Post|Header|Footer]Text() to HTMLForm::[get|set|add][Pre|Post|Header|Footer]Html() and deprecate the old methods. Their arguments are rendered as raw HTML so the old name was misleading. Some of these are marked as stable to override and theoretically the renaming could cause problems if callers are updated to the new name while the overriding class is still using the old name, but the only case known to codesearch is OOUIHTMLForm which is also updated here. Bug: T290771 Change-Id: I2c269eb6ab2b320fa2eef4ee8a226e96ad05fbe2
Diffstat (limited to 'tests/phpunit/includes/htmlform/HTMLFormTest.php')
-rw-r--r--tests/phpunit/includes/htmlform/HTMLFormTest.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/phpunit/includes/htmlform/HTMLFormTest.php b/tests/phpunit/includes/htmlform/HTMLFormTest.php
index efb753e842e0..99a24c737605 100644
--- a/tests/phpunit/includes/htmlform/HTMLFormTest.php
+++ b/tests/phpunit/includes/htmlform/HTMLFormTest.php
@@ -62,6 +62,13 @@ class HTMLFormTest extends MediaWikiIntegrationTestCase {
$this->assertSame( $preText, $form->getPreText() );
}
+ public function testGetPreHtml() {
+ $preHtml = 'TEST';
+ $form = $this->newInstance();
+ $form->setPreHtml( $preHtml );
+ $this->assertSame( $preHtml, $form->getPreHtml() );
+ }
+
public function testGetErrorsOrWarningsWithRawParams() {
$form = $this->newInstance();
$msg = new RawMessage( 'message with $1' );