19 declare(strict_types=1);
    21 require_once(
"libs/composer/vendor/autoload.php");
    22 require_once(__DIR__ . 
"/../Base.php");
    41         $_SERVER[
"SERVER_NAME"] = 
"localhost";
    45         $_SERVER[
'QUERY_STRING'] = 
"param=1";
    48         $_POST[
"ilfilehash"] = 
"";
    60         $this->dic[
"tpl"] = $this->
getTemplateFactory()->getTemplate(
"tpl.main.html", 
false, 
false);
    62         $this->dic[
"refinery"] = new \ILIAS\Refinery\Factory(
    70         $this->dic[
"ilCtrl"] = $this->getMockBuilder(\ilCtrl::class)->disableOriginalConstructor()->onlyMethods([
    71             "getFormActionByClass",
"setParameterByClass",
"saveParameterByClass",
"getLinkTargetByClass", 
"isAsynch"    73         $this->dic[
"ilCtrl"]->method(
"getFormActionByClass")->willReturn(
"Testing");
    74         $this->dic[
"ilCtrl"]->method(
"getLinkTargetByClass")->willReturn(
"2");
    75         $this->dic[
"ilCtrl"]->method(
"isAsynch")->willReturn(
false);
    77         $this->dic[
"upload"] = $this->getMockBuilder(FileUpload::class)->getMock();
    79         $this->dic[
"tree"] = $this->getMockBuilder(ilTree::class)
    80                                   ->disableOriginalConstructor()
    81                                   ->onlyMethods([
"getNodeData"])->getMock();
    83         $this->dic[
"tree"]->method(
"getNodeData")->willReturn([
    85             "title" => 
"mock root node",
    89         $component_factory = $this->createMock(ilComponentFactory::class);
    90         $component_factory->method(
"getActivePluginsInSlot")->willReturn(
new ArrayIterator());
    91         $this->dic[
"component.factory"] = $component_factory;
    95         $this->dic[
"ilUser"] = $this->getMockBuilder(\ilObjUser::class)
    96                 ->disableOriginalConstructor()
    97                 ->onlyMethods([
"getDateFormat"])
   112             if ($entry->getNamespace() === 
"\ILIAS\UI\Help\Topic[]") {
   115             if (!$entry->isAbstract()) {
   116                 $this->assertGreaterThan(
   118                     count($entry->getExamples()),
   119                     "Non abstract Component " . $entry->getNamespace()
   120                     . 
" does not provide any example. Please provide at least one in " . $entry->getExamplesNamespace() . 
" at " . $entry->getExamplesPath()
   134         include_once $example_path;
   136             $this->assertIsString($example_function_name(), 
" Example $example_function_name does not render a string");
   138             $this->assertTrue(
true);
   148         return $crawler->crawlFactory($this->path_to_base_factory);
   153         $function_names = [];
   155             foreach ($entry->getExamples() as $name => $example_path) {
   156                 $function_names[$entry->getExamplesNamespace() . 
"\\" . $name] = [
   157                     $entry->getExamplesNamespace() . 
"\\" . $name,
   162         return $function_names;
   173         include_once $example_path;
   175             $this->assertIsString($example_function_name($DIC), 
" Example $example_function_name does not render a string");
   177             $this->assertTrue(
true);
   184             [
'ILIAS\UI\examples\MainControls\Footer\renderFooterInFullscreenMode', 
"src/UI/examples/MainControls/Footer/footer.php"],
   185             [
'ILIAS\UI\examples\MainControls\Footer\renderFooterWithModalsInFullscreenMode', 
"src/UI/examples/MainControls/Footer/footer_with_modals.php"],
   186             [
'ILIAS\UI\examples\MainControls\MetaBar\renderMetaBarInFullscreenMode', 
"src/UI/examples/MainControls/MetaBar/base_metabar.php"],
   187             [
'ILIAS\UI\examples\Layout\Page\Standard\getUIMainbarExampleCondensed', 
"src/UI/examples/Layout/Page/Standard/ui_mainbar.php"],
   188             [
'ILIAS\UI\examples\Layout\Page\Standard\getUIMainbarExampleFull', 
"src/UI/examples/Layout/Page/Standard/ui_mainbar.php"],
   189             [
'ILIAS\UI\examples\Layout\Page\Standard\ui', 
"src/UI/examples/Layout/Page/Standard/ui.php"],
   190             [
'ILIAS\UI\examples\MainControls\ModeInfo\renderModeInfoFullscreenMode', 
"src/UI/examples/MainControls/ModeInfo/modeinfo.php"]
 Class ExamplesTest Checks if all examples are implemented and properly returning strings. 
 
Class ChatMainBarProvider . 
 
setUpMockDependencies()
Some wiring up of dependencies to get all the examples running. 
 
This exception indicates that an UI component was accepted by the JF but is not backed by a real impl...
 
string $path_to_base_factory
 
Customizing of pimple-DIC for ILIAS. 
 
Responsible for loading the UI Framework into the dependency injection container of ILIAS...
 
Provides common functionality for UI tests. 
 
testAllExamplesRenderAString(string $example_function_name, string $example_path)
getFullFunctionNamesAndPathExample 
 
testFullscreenModeExamples(string $example_function_name, string $example_path)
getListOfFullscreenExamples 
 
getListOfFullscreenExamples()
 
getFullFunctionNamesAndPathExample()
 
testAllNonAbstractComponentsShowcaseExamples()
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
Responsible for loading the HTTP Service into the dependency injection container of ILIAS...