19 declare(strict_types=1);
23 require_once
"class.ilDummyKioskModeView.php";
29 $ctrl = $this->createMock(ilCtrl::class);
30 $lng = $this->createMock(ilLanguage::class);
31 $access = $this->createMock(ilAccess::class);
32 $obj_definition = $this->createMock(ilObjectDefinition::class);
36 $this->assertInstanceOf(ilKioskModeService::class, $obj);
41 $ctrl = $this->createMock(ilCtrl::class);
42 $lng = $this->createMock(ilLanguage::class);
43 $access = $this->createMock(ilAccess::class);
45 $ilObject = $this->createMock(ilObject::class);
47 ->expects($this->once())
49 ->willReturn(
"testtype")
52 $obj_definition = $this->createMock(ilObjectDefinition::class);
54 ->expects($this->exactly(1))
55 ->method(
"getClassName")
62 $this->assertNull($obj->getViewFor($ilObject));
67 $ctrl = $this->createMock(ilCtrl::class);
68 $lng = $this->createMock(ilLanguage::class);
69 $access = $this->createMock(ilAccess::class);
71 $ilObject = $this->createMock(ilObject::class);
73 ->expects($this->once())
75 ->willReturn(
"testtype")
78 $obj_definition = $this->createMock(ilObjectDefinition::class);
80 ->expects($this->exactly(2))
81 ->method(
"getClassName")
88 $result = $obj->getViewFor($ilObject);
90 $this->assertInstanceOf(ilDummyKioskModeView::class, $result);
test_getViewFor_non_existing_type()
Central entry point for users of the service.