26 ->expects($this->any())
28 ->willReturn(
'dummy');
36 $criterion = new \ilTermsOfServiceNullCriterion();
48 $this->assertEquals(
'null', $criterion->getTypeIdent());
49 $this->assertEquals(
false, $criterion->hasUniqueNature());
64 ->getMockBuilder(\ilRadioGroupInputGUI::class)
65 ->disableOriginalConstructor()
66 ->setMethods([
'getPostVar',
'addOption'])
69 $form->addItem($radioGroup);
72 ->expects($this->never())
73 ->method(
'addOption');
87 $gui = $criterion->
ui($this->lng);
100 $gui = $criterion->
ui($this->lng);
105 ->expects($this->never())
106 ->method(
'getInput');
108 $value = $gui->getConfigByForm(
$form);
110 $this->assertInstanceOf(\ilTermsOfServiceCriterionConfig::class, $value);
120 $gui = $criterion->
ui($this->lng);
122 $actual = $gui->getIdentPresentation();
124 $this->assertInternalType(
'string', $actual);
125 $this->assertNotEmpty($actual);
131 public function testValuePresentationMatchesExpectation()
134 $gui = $criterion->ui($this->lng);
137 $actual = $gui->getValuePresentation(
139 $this->dic->ui()->factory()
142 $this->assertInstanceOf(Component::class, $actual);
143 $this->assertInstanceOf(Legacy::class, $actual);
144 $this->assertEquals(
'-', $actual->getContent());
155 $this->assertTrue($criterion->evaluate(
$user, $this->getCriterionConfig()));
Interface ilTermsOfServiceCriterionTypeGUI.
testNoFormUserInterfaceElementsAreBuilt(\ilTermsOfServiceNullCriterion $criterion)
Class ilTermsOfServiceCriterionBaseTest.
getCriterionConfig($value=null)
testTypeIdentPresentatioEqualsANonEmptyString(\ilTermsOfServiceNullCriterion $criterion)
testNoFormUserInterfaceElementsAreBuilt
if(isset($_POST['submit'])) $form
appendOption(\ilRadioGroupInputGUI $option, \ilTermsOfServiceCriterionConfig $config)
Class ilTermsOfServiceNullCriterion.
testCriterionAlwaysCreateEmptyConfigValue(\ilTermsOfServiceNullCriterion $criterion)
testNoFormUserInterfaceElementsAreBuilt
testEvaluationAlwaysSucceeds()
testInstanceCanBeCreated()
buildForm(\ilTermsOfServiceCriterionTypeGUI $gui)
Class ilTermsOfServiceNullCriterionTest.