ILIAS  release_8 Revision v8.23
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.

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

Referenced by getViewControlFactory().

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  }
Class ChatMainBarProvider .
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ 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.

Referenced by buildFieldFactory(), and getViewControlFactory().

47  : Refinery
48  {
49  return new Refinery(
50  new \ILIAS\Data\Factory(),
51  $this->createMock(ilLanguage::class)
52  );
53  }
Class ChatMainBarProvider .
+ Here is the caller graph for this function:

◆ getMockStorage()

TableTestBase::getMockStorage ( )
protected

Definition at line 88 of file TableTestBase.php.

References $data.

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

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  }
+ Here is the caller graph for this function:

◆ getTableFactory()

TableTestBase::getTableFactory ( )
protected

Definition at line 74 of file TableTestBase.php.

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

Referenced by DataViewControlsTest\getTable(), DataTest\getTable(), 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(), PresentationTest\testRowConstruction(), and PresentationTest\testTableConstruction().

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  }
Class ChatMainBarProvider .
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getViewControlContainerFactory()
+ 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.

References getViewControlFactory().

Referenced by getTableFactory().

67  {
69  new C\SignalGenerator(),
70  $this->getViewControlFactory(),
71  );
72  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Builds data types.
Definition: Factory.php:20
+ 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.

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

Referenced by getTableFactory(), and getViewControlContainerFactory().

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  }
Class ChatMainBarProvider .
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This is how the factory for UI elements looks.
Definition: Factory.php:30
+ 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: