mirror of
https://github.com/e107inc/e107.git
synced 2025-08-14 02:24:08 +02:00
"<div class='field-help'>" etc has been replaced by the $frm->help() method and is also used by the admin-ui.
This commit is contained in:
@@ -234,6 +234,38 @@ class e_formTest extends \Codeception\Test\Unit
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function testHelp()
|
||||
{
|
||||
// disabled
|
||||
$this->_frm->setHelpLocation('none');
|
||||
$result = $this->_frm->help('my tip', 'before');
|
||||
$this->assertEmpty($result);
|
||||
$result = $this->_frm->help('my tip', 'after');
|
||||
$this->assertEmpty($result);
|
||||
|
||||
// display after only.
|
||||
$this->_frm->setHelpLocation('after');
|
||||
$result = $this->_frm->help('my tip', 'before');
|
||||
$this->assertEmpty($result);
|
||||
|
||||
$result = $this->_frm->help('my tip', 'after');
|
||||
$this->assertSame('<div class="field-help" data-placement="left">my tip</div>', $result);
|
||||
|
||||
|
||||
// display as icon before field only.
|
||||
$this->_frm->setHelpLocation('before');
|
||||
$result = $this->_frm->help('my tip', 'before');
|
||||
$this->assertSame('<i class="admin-ui-help-tip far fa-question-circle"><!-- --></i><div class="field-help" data-placement="left">my tip</div>', $result);
|
||||
$result = $this->_frm->help('my tip', 'after');
|
||||
$this->assertEmpty($result);
|
||||
|
||||
|
||||
$this->_frm->setHelpLocation('after');
|
||||
|
||||
|
||||
}
|
||||
/*
|
||||
public function testGetRequiredString()
|
||||
|
Reference in New Issue
Block a user