Commit efe1b48d authored by Carsten  Rose's avatar Carsten Rose
Browse files

Refactor to new class Checkbox() - fix unit tests

parent 12abe6a6
Pipeline #2876 passed with stages
in 3 minutes and 37 seconds
......@@ -38,6 +38,16 @@ class Checkbox {
private $store = null;
/**
* Checkbox constructor.
* @throws \CodeException
* @throws \UserFormException
* @throws \UserReportException
*/
public function __construct() {
$this->store = Store::getInstance();
}
/**
* Builds HTML 'checkbox' element.
*
......
......@@ -66,18 +66,6 @@ class BuildFormPlainTest extends AbstractDatabaseTest {
$this->assertEquals('', $result);
}
/**
* @throws \CodeException
* @throws \UserFormException
* @throws \UserReportException
*/
public function testBuildLabel() {
$build = new BuildFormPlain([F_DB_INDEX => DB_INDEX_DEFAULT], array(), array(), $this->dbArray);
$result = $build->buildLabel('myLabel:123', "Hello World");
$this->assertEquals('<label for="myLabel:123" class="control-label" >Hello World</label>', $result);
}
/**
* @throws \CodeException
* @throws \UserFormException
......
......@@ -369,6 +369,16 @@ class HelperFormElementTest extends TestCase {
}
/**
* @throws \CodeException
* @throws \UserFormException
* @throws \UserReportException
*/
public function testBuildLabel() {
$result = HelperFormElement::buildLabel('myLabel:123', "Hello World");
$this->assertEquals('<label for="myLabel:123" class="control-label" >Hello World</label>', $result);
}
// public function testExplodeTemplateGroupElements() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment