ILIAS  release_8 Revision v8.24
TableTestBase Class Reference

Basic Tests for all Tables. More...

+ Inheritance diagram for TableTestBase:
+ Collaboration diagram for TableTestBase:

Protected Member Functions

 buildFieldFactory ()
 
 buildRefinery ()
 
 getViewControlFactory ()
 
 getViewControlContainerFactory ()
 
 getTableFactory ()
 
 getMockStorage ()
 
- Protected Member Functions inherited from ILIAS_UI_TestBase
 brutallyTrimHTML (string $html)
 A more radical version of normalizeHTML. More...
 
 brutallyTrimSignals (string $html)
 A naive replacement of all il_signal-ids with dots to ease comparisons of rendered output. More...
 

Additional Inherited Members

- Public Member Functions inherited from ILIAS_UI_TestBase
 setUp ()
 
 tearDown ()
 
 getUIFactory ()
 
 getTemplateFactory ()
 
 getResourceRegistry ()
 
 getLanguage ()
 
 getJavaScriptBinding ()
 
 getRefinery ()
 
 getImagePathResolver ()
 
 getDataFactory ()
 
 getDefaultRenderer (JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
 
 getDecoratedRenderer (Renderer $default)
 
 normalizeHTML (string $html)
 
 assertHTMLEquals (string $expected_html_as_string, string $html_as_string)
 

Detailed Description

Basic Tests for all Tables.

Definition at line 34 of file TableTestBase.php.

Member Function Documentation

◆ buildFieldFactory()

TableTestBase::buildFieldFactory ( )
protected

Definition at line 36 of file TableTestBase.php.

36 : FieldFactory
37 {
38 return new FieldFactory(
39 $this->createMock(UploadLimitResolver::class),
40 new C\SignalGenerator(),
41 new \ILIAS\Data\Factory(),
42 $this->buildRefinery(),
43 $this->getLanguage()
44 );
45 }
Builds data types.
Definition: Factory.php:21
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ChatMainBarProvider \MainMenu\Provider.

References buildRefinery(), and ILIAS_UI_TestBase\getLanguage().

Referenced by getViewControlFactory().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildRefinery()

TableTestBase::buildRefinery ( )
protected

Definition at line 47 of file TableTestBase.php.

47 : Refinery
48 {
49 return new Refinery(
50 new \ILIAS\Data\Factory(),
51 $this->createMock(ilLanguage::class)
52 );
53 }

Referenced by buildFieldFactory(), and getViewControlFactory().

+ Here is the caller graph for this function:

◆ getMockStorage()

TableTestBase::getMockStorage ( )
protected

Definition at line 88 of file TableTestBase.php.

88 : ArrayAccess
89 {
90 return new class () implements ArrayAccess {
91 protected array $data = [];
92 public function offsetExists($offset)
93 {
94 return isset($this->data[$offset]);
95 }
96 public function offsetGet($offset)
97 {
98 if(!$this->offsetExists($offset)) {
99 return null;
100 }
101 return $this->data[$offset];
102 }
103 public function offsetSet($offset, $value)
104 {
105 $this->data[$offset] = $value;
106 }
107 public function offsetUnset($offset)
108 {
109 unset($this->data[$offset]);
110 }
111 };
112 }

References $data.

Referenced by getTableFactory(), and DataTest\testDataTableWithIdAndStorage().

+ Here is the caller graph for this function:

◆ getTableFactory()

TableTestBase::getTableFactory ( )
protected

Definition at line 74 of file TableTestBase.php.

74 : C\Table\Factory
75 {
76 return new C\Table\Factory(
77 new C\SignalGenerator(),
78 $this->getViewControlFactory(),
80 new \ILIAS\Data\Factory(),
81 new C\Table\Column\Factory($this->getLanguage()),
82 new C\Table\Action\Factory(),
83 new C\Table\DataRowBuilder(),
84 $this->getMockStorage()
85 );
86 }
getViewControlContainerFactory()

References ILIAS_UI_TestBase\getLanguage(), getMockStorage(), getViewControlContainerFactory(), and getViewControlFactory().

Referenced by DataTest\getTable(), DataViewControlsTest\getTable(), DataRendererTest\getUIFactory(), PresentationTest\testBareTableRendering(), DataTest\testDataTableActions(), DataTest\testDataTableBasicConstruction(), DataTest\testDataTableColumns(), DataTest\testDataTableConstructionWithErrorColumns(), DataTest\testDataTableConstructionWithoutColumns(), DataViewControlsTest\testDataTableHasNoFieldSelectionViewControl(), DataViewControlsTest\testDataTableHasNoOrderingViewControl(), DataViewControlsTest\testDataTableHasNoPaginationViewControl(), DataViewControlsTest\testDataTableHasViewControls(), DataViewControlsTest\testDataTableViewControlStorage(), DataTest\testDataTableWithSelectedOptionalCols(), PresentationTest\testFullRendering(), PresentationTest\testMinimalRendering(), DataRendererTest\testRenderEmptyDataCell(), PresentationTest\testRowConstruction(), and PresentationTest\testTableConstruction().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getViewControlContainerFactory()

TableTestBase::getViewControlContainerFactory ( )
protected

Definition at line 66 of file TableTestBase.php.

67 {
69 new C\SignalGenerator(),
70 $this->getViewControlFactory(),
71 );
72 }
This is what a factory for View Control Containers looks like.
Definition: Factory.php:27

References getViewControlFactory().

Referenced by getTableFactory().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getViewControlFactory()

TableTestBase::getViewControlFactory ( )
protected

Definition at line 55 of file TableTestBase.php.

56 {
57 return new ViewControl\Factory(
58 $this->buildFieldFactory(),
59 new \ILIAS\Data\Factory(),
60 $this->buildRefinery(),
61 new C\SignalGenerator(),
62 $this->getLanguage(),
63 );
64 }
This is how the factory for UI elements looks.
Definition: Factory.php:31

References buildFieldFactory(), buildRefinery(), and ILIAS_UI_TestBase\getLanguage().

Referenced by getTableFactory(), and getViewControlContainerFactory().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: