3declare(strict_types=1);
 
   29    protected function setUp(): void
 
   38        $this->assertInstanceOf(ilTestPlayerConfirmationModal::class, $this->testObj);
 
   43        $this->testObj->setModalId(
"12345");
 
   44        $this->assertEquals(
"12345", $this->testObj->getModalId());
 
   49        $this->testObj->setHeaderText(
"testString");
 
   50        $this->assertEquals(
"testString", $this->testObj->getHeaderText());
 
   55        $this->testObj->setConfirmationText(
"testString");
 
   56        $this->assertEquals(
"testString", $this->testObj->getConfirmationText());
 
   61        $this->testObj->setConfirmationCheckboxName(
"testString");
 
   62        $this->assertEquals(
"testString", $this->testObj->getConfirmationCheckboxName());
 
   67        $this->testObj->setConfirmationCheckboxLabel(
"testString");
 
   68        $this->assertEquals(
"testString", $this->testObj->getConfirmationCheckboxLabel());
 
   76        foreach ([51, 291, 15, 681] as 
$id) {
 
   78            $button->setId((
string) 
$id);
 
   79            $expected[] = $button;
 
   82        foreach ($expected as $button) {
 
   83            $this->testObj->addButton($button);
 
   86        $this->assertEquals($expected, $this->testObj->getButtons());
 
   96        foreach ([51, 291, 15, 681] as 
$id) {
 
   98            $expected[] = $hiddenInput;
 
  101        foreach ($expected as $hiddenInput) {
 
  102            $this->testObj->addParameter($hiddenInput);
 
  105        $this->assertEquals($expected, $this->testObj->getParameters());
 
  110        $this->assertFalse($this->testObj->isConfirmationCheckboxRequired());
 
  112        $this->testObj->setConfirmationCheckboxName(
"testName");
 
  113        $this->testObj->setConfirmationCheckboxLabel(
"testLabel");
 
  114        $this->assertTrue($this->testObj->isConfirmationCheckboxRequired());
 
  121        $result = $this->testObj->buildModalButtonInstance(
"201");
 
  122        $this->assertInstanceOf(ilLinkButton::class, $result);
 
  123        $this->assertEquals(
"201", $result->getId());
 
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
test_instantiateObject_shouldReturnInstance()
 
ilTestPlayerConfirmationModal $testObj
 
testBuildModalButtonInstance()
 
testIsConfirmationCheckboxRequired()
 
testConfirmationCheckboxLabel()
 
testConfirmationCheckboxName()