ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
TableRendererTestBase.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21require_once("vendor/composer/vendor/autoload.php");
22require_once(__DIR__ . "/TableTestBase.php");
23
26use ILIAS\Data;
27use Psr\Http\Message\ServerRequestInterface;
28
33{
34 protected function getActionFactory()
35 {
36 return new I\Table\Action\Factory();
37 }
38
39 protected function getColumnFactory()
40 {
41 return new I\Table\Column\Factory(
42 $this->getLanguage()
43 );
44 }
45
46 protected function getDummyRequest()
47 {
48 $request = $this->createMock(ServerRequestInterface::class);
49 $request
50 ->method("getUri")
51 ->willReturn(new \GuzzleHttp\Psr7\Uri('http://localhost:80'));
52 $request
53 ->method("getQueryParams")
54 ->willReturn([]);
55 return $request;
56 }
57
58 public function getDataFactory(): Data\Factory
59 {
60 return new Data\Factory();
61 }
62
63 public function getUIFactory(): NoUIFactory
64 {
65 $factory = new class ($this->getTableFactory()) extends NoUIFactory {
66 public function __construct(
67 protected Component\Table\Factory $table_factory
68 ) {
69 }
70 public function button(): I\Button\Factory
71 {
72 return new I\Button\Factory();
73 }
74 public function dropdown(): I\Dropdown\Factory
75 {
76 return new I\Dropdown\Factory();
77 }
78 public function symbol(): I\Symbol\Factory
79 {
80 return new I\Symbol\Factory(
81 new I\Symbol\Icon\Factory(),
82 new I\Symbol\Glyph\Factory(),
83 new I\Symbol\Avatar\Factory()
84 );
85 }
86 public function table(): I\Table\Factory
87 {
88 return $this->table_factory;
89 }
90 public function divider(): I\Divider\Factory
91 {
92 return new I\Divider\Factory();
93 }
94 };
95 return $factory;
96 }
97}
Builds data types.
Definition: Factory.php:36
Tests for the Renderer of DataTables.
Basic Tests for all Tables.
This describes a symbol.
Definition: Symbol.php:30
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
button(string $caption, string $cmd)
getLanguage()