Currently there is no way to access the preText outside of an HTMLForm. Adding
a getPreText method to HTMLForm so the preText is accessible.
Bug: T199115
Change-Id: I937028e7025b4a7b5d333e9bf5a25920f6a88316
return $this;
}
+ /**
+ * Get the introductory message HTML.
+ *
+ * @since 1.32
+ *
+ * @return string
+ */
+ public function getPreText() {
+ return $this->mPre;
+ }
+
/**
* Add HTML to the header, inside the form.
*
$this->assertContains( ' autocomplete="off"', $form->wrapForm( '' ) );
}
+ public function testGetPreText() {
+ $preText = 'TEST';
+ $form = $this->newInstance();
+ $form->setPreText( $preText );
+ $this->assertSame( $preText, $form->getPreText() );
+ }
+
}