ILIAS  trunk Revision v11.0_alpha-1689-g66c127b4ae8
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ActionFactoryTest.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 require_once 'components/ILIAS/UI/tests/AbstractFactoryTestCase.php';
22 
24 use ILIAS\Data;
26 
28 {
29  public static array $kitchensink_info_settings = [
30  "standard" => ["context" => false, "rules" => false],
31  "single" => ["context" => false, "rules" => false],
32  "multi" => ["context" => false, "rules" => false]
33  ];
34 
35  public static string $factory_title = 'ILIAS\\UI\\Component\\Table\\Action\\Factory';
36 
37  protected function buildFactories()
38  {
39  return [
40  new \ILIAS\UI\Implementation\Component\Table\Action\Factory(),
41  new Data\Factory()
42  ];
43  }
44 
45  public function testImplementsInterfaces()
46  {
47  list($f, $df) = $this->buildFactories();
48  $target = $df->uri('http://wwww.ilias.de?ref_id=1');
49  $url_builder = new URLBuilder($target);
50  list($builder, $token) = array_values(
51  $url_builder->acquireParameter(['namespace'], 'rowids')
52  );
53 
54  $standard = $f->standard("", $builder, $token);
55  $this->assertInstanceOf(Action\Action::class, $standard);
56  $this->assertInstanceOf(Action\Standard::class, $standard);
57 
58  $single = $f->single("", $builder, $token);
59  $this->assertInstanceOf(Action\Action::class, $single);
60  $this->assertInstanceOf(Action\Single::class, $single);
61 
62  $multi = $f->multi("", $builder, $token);
63  $this->assertInstanceOf(Action\Action::class, $multi);
64  $this->assertInstanceOf(Action\Multi::class, $multi);
65  }
66 }
static string $factory_title
static array $kitchensink_info_settings
$token
Definition: xapitoken.php:70
URLBuilder.
Definition: URLBuilder.php:40
Defines tests every SHOULD pass UI-factory.