ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
CharacteristicValueTest.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21require_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}
Provides common functionality for UI tests.
Definition: Base.php:337