19 declare(strict_types=1);
34 protected function setUp(): void
42 ->willReturn(
'dummy');
54 $this->assertSame(
'null', $criterion->getTypeIdent());
55 $this->assertFalse($criterion->hasUniqueNature());
70 ->getMockBuilder(ilRadioGroupInputGUI::class)
71 ->disableOriginalConstructor()
72 ->onlyMethods([
'getPostVar',
'addOption'])
75 $form->addItem($radioGroup);
78 ->expects($this->never())
79 ->method(
'addOption');
94 $gui = $criterion->
ui($this->
lng);
107 $gui = $criterion->
ui($this->
lng);
112 ->expects($this->never())
113 ->method(
'getInput');
115 $value = $gui->getConfigByForm($form);
117 $this->assertInstanceOf(ilTermsOfServiceCriterionConfig::class, $value);
127 $gui = $criterion->
ui($this->
lng);
129 $actual = $gui->getIdentPresentation();
131 $this->assertIsString($actual);
132 $this->assertNotEmpty($actual);
135 public function testValuePresentationMatchesExpectation():
void 138 $gui = $criterion->ui($this->
lng);
141 $actual = $gui->getValuePresentation(
146 $this->assertInstanceOf(Component::class, $actual);
147 $this->assertInstanceOf(Legacy::class, $actual);
148 $this->assertSame(
'-', $actual->getContent());
156 $this->assertTrue($criterion->evaluate($user, $this->getCriterionConfig()));
testTypeIdentPresentationEqualsANonEmptyString(ilTermsOfServiceNullCriterion $criterion)
testNoFormUserInterfaceElementsAreBuilt
Interface ilTermsOfServiceCriterionTypeGUI.
Class ilTermsOfServiceCriterionBaseTest.
buildForm(ilTermsOfServiceCriterionTypeGUI $gui)
testNoFormUserInterfaceElementsAreBuilt(ilTermsOfServiceNullCriterion $criterion)
getCriterionConfig($value=null)
appendOption(ilRadioGroupInputGUI $group, ilTermsOfServiceCriterionConfig $config)
testCriterionAlwaysCreateEmptyConfigValue(ilTermsOfServiceNullCriterion $criterion)
testNoFormUserInterfaceElementsAreBuilt
Class ilTermsOfServiceNullCriterion.
testEvaluationAlwaysSucceeds()
testInstanceCanBeCreated()
Class ilTermsOfServiceNullCriterionTest.