ILIAS  release_7 Revision v7.30-3-g800a261c036
CharacteristicValueTest.php
Go to the documentation of this file.
1<?php
2
3require_once('tests/UI/Base.php');
4
6
8{
9 public function test_interfaces()
10 {
12
13 $this->assertInstanceOf(
14 'ILIAS\\UI\\Component\\Listing\\CharacteristicValue\\Factory',
15 $f
16 );
17
18 $this->assertInstanceOf(
19 'ILIAS\\UI\\Component\\Listing\\CharacteristicValue\\Text',
20 $f->text($this->getTextItemsMock())
21 );
22 }
23
24 protected function getCharacteristicValueFactory() : CharacteristicValueFactory
25 {
26 return new CharacteristicValueFactory();
27 }
28
29 protected function getTextItemsMock() : array
30 {
31 return [
32 'label1' => 'item1', 'label2' => 'item2', 'label3' => 'item3'
33 ];
34 }
35
36 protected function getInvalidTextItemsMocks() : array
37 {
38 return [
39 ['' => 'item'],
40 ['label' => ''],
41 []
42 ];
43 }
44}
An exception for terminatinating execution or to throw for unit testing.
Provides common functionality for UI tests.
Definition: Base.php:263