ILIAS  trunk Revision v11.0_alpha-1769-g99a433fe2dc
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
CharacteristicValueTest.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 require_once('components/ILIAS/UI/tests/Base.php');
22 
24 
26 {
27  public function testInterfaces(): void
28  {
30 
31  $this->assertInstanceOf(
32  'ILIAS\\UI\\Component\\Listing\\CharacteristicValue\\Factory',
33  $f
34  );
35 
36  $this->assertInstanceOf(
37  'ILIAS\\UI\\Component\\Listing\\CharacteristicValue\\Text',
38  $f->text($this->getTextItemsMock())
39  );
40  }
41 
42  protected function getCharacteristicValueFactory(): CharacteristicValueFactory
43  {
44  return new CharacteristicValueFactory();
45  }
46 
47  protected function getTextItemsMock(): array
48  {
49  return [
50  'label1' => 'item1',
51  'label2' => 'item2',
52  'label3' => 'item3'
53  ];
54  }
55 
56  protected function getInvalidTextItemsMocks(): array
57  {
58  return [
59  ['' => 'item'],
60  ['label' => ''],
61  []
62  ];
63  }
64 }