1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-16 03:24:20 +02:00

Experimental theme snippets feature added.

This commit is contained in:
Cameron
2020-12-22 17:06:52 -08:00
parent 3c57f3fa96
commit ce7fa515c3
3 changed files with 125 additions and 16 deletions

View File

@@ -1139,4 +1139,24 @@ class e_formTest extends \Codeception\Test\Unit
}
/**
* Loads snipper from e107_themes/bootstrap/snippets/form_checkbox.html
*/
public function testSnippet()
{
$this->_frm->_snippets = true;
$result = $this->_frm->checkbox('myname', 3, true, ['readonly'=>true]);
$expected = "<label class='checkbox form-check'>
<input id='myname-3' class='form-check-input' type='checkbox' name='myname' value='3' readonly='readonly' checked='checked' />
<span></span>
</label>";
$this->assertSame($expected, $result);
$this->_frm->_snippets = false;
}
}