ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ColumnFactoryTest Class Reference
+ Inheritance diagram for ColumnFactoryTest:
+ Collaboration diagram for ColumnFactoryTest:

Public Member Functions

 getColumnTypeProvider ()
 
 testDataTableColsImplementInterfaces ($class, $instance)
 getColumnTypeProvider More...
 
- Public Member Functions inherited from AbstractFactoryTest
 buildFactoryReflection ()
 
 methods_provider ()
 
 setUp ()
 
 test_proper_namespace ()
 
 test_proper_name ()
 
 test_check_yaml_extraction (ReflectionMethod $method_reflection, string $name)
 Tests whether the YAML Kitchen Sink info can be parsed. More...
 
 test_return_type (ReflectionMethod $method_reflection, string $name)
 Tests whether the method either returns a factory or a component. More...
 
 test_factory_method_name_compatible_docstring (ReflectionMethod $method_reflection, string $name)
 Tests whether the method name matches the return doctring? More...
 
 test_method_params (ReflectionMethod $method_reflection, string $name)
 Tests whether methods returning factories have no parameters. More...
 
 test_kitchensink_info_description (ReflectionMethod $method_reflection, string $name)
 methods_provider More...
 
 test_kitchensink_info_rivals (ReflectionMethod $method_reflection, string $name)
 methods_provider More...
 
 test_kitchensink_info_background (ReflectionMethod $method_reflection, string $name)
 methods_provider More...
 
 test_kitchensink_info_featurewiki (ReflectionMethod $method_reflection, string $name)
 methods_provider More...
 
 test_kitchensink_info_javascript (ReflectionMethod $method_reflection, string $name)
 methods_provider More...
 
 test_kitchensink_info_rules (ReflectionMethod $method_reflection, string $name)
 methods_provider More...
 
 test_kitchensink_info_context (ReflectionMethod $method_reflection, string $name)
 methods_provider More...
 
 kitchensink_info_settings_merged_with_defaults (string $name)
 

Data Fields

 $kitchensink_info_settings
 
 rules
 
 $factory_title = 'ILIAS\\UI\\Component\\Table\\Column\\Factory'
 
- Data Fields inherited from AbstractFactoryTest
const COMPONENT = 1
 
const FACTORY = 2
 

Protected Member Functions

 buildFactories ()
 
- Protected Member Functions inherited from AbstractFactoryTest
 returnsFactory (array $docstring_data)
 
 returnsComponent (array $docstring_data)
 
 isFactoryName (string $name)
 
 get_regex_factory_namespace ()
 

Detailed Description

Definition at line 26 of file ColumnFactoryTest.php.

Member Function Documentation

◆ buildFactories()

ColumnFactoryTest::buildFactories ( )
protected

Definition at line 43 of file ColumnFactoryTest.php.

References $lng.

Referenced by getColumnTypeProvider().

44  {
45  $lng = $this->getMockBuilder(\ilLanguage::class)
46  ->disableOriginalConstructor()
47  ->getMock();
48  $lng->method('txt')->willReturnCallback(fn($v) => $v);
49 
50  return [
51  new \ILIAS\UI\Implementation\Component\Table\Column\Factory($lng),
52  new Data\Factory()
53  ];
54  }
$lng
+ Here is the caller graph for this function:

◆ getColumnTypeProvider()

ColumnFactoryTest::getColumnTypeProvider ( )

Definition at line 56 of file ColumnFactoryTest.php.

References Vendor\Package\$f, and buildFactories().

56  : array
57  {
58  list($f, $df) = $this->buildFactories();
59  $date_format = $df->dateFormat()->germanShort();
60 
61  return [
62  [Column\Text::class, $f->text("")],
63  [Column\Date::class, $f->date("", $date_format)],
64  [Column\TimeSpan::class, $f->timespan("", $date_format)],
65  [Column\Number::class, $f->number("")],
66  [Column\Boolean::class, $f->boolean("", '1', '0')],
67  [Column\Status::class, $f->status("")],
68  [Column\StatusIcon::class, $f->statusIcon("")],
69  [Column\EMail::class, $f->eMail("")],
70  [Column\Link::class, $f->link("")],
71  [Column\LinkListing::class, $f->linkListing("")]
72  ];
73  }
+ Here is the call graph for this function:

◆ testDataTableColsImplementInterfaces()

ColumnFactoryTest::testDataTableColsImplementInterfaces (   $class,
  $instance 
)

getColumnTypeProvider

Definition at line 78 of file ColumnFactoryTest.php.

79  {
80  $this->assertInstanceOf(Column\Column::class, $instance);
81  $this->assertInstanceOf($class, $instance);
82  }
A Column describes the form of presentation for a certain aspect of data, i.e.
Definition: Column.php:27

Field Documentation

◆ $factory_title

ColumnFactoryTest::$factory_title = 'ILIAS\\UI\\Component\\Table\\Column\\Factory'

Definition at line 41 of file ColumnFactoryTest.php.

◆ $kitchensink_info_settings

ColumnFactoryTest::$kitchensink_info_settings
Initial value:
= [
"text" => ["context" => false

Definition at line 28 of file ColumnFactoryTest.php.

◆ rules

ColumnFactoryTest::rules
Initial value:
=> false],
"number" => ["context" => false, "rules" => false],
"date" => ["context" => false, "rules" => false],
"boolean" => ["context" => false, "rules" => false],
"eMail" => ["context" => false, "rules" => false],
"status" => ["context" => false, "rules" => false],
"statusIcon" => ["context" => false, "rules" => false],
"timeSpan" => ["context" => false, "rules" => false],
"link" => ["context" => false, "rules" => false],
"linkListing" => ["context" => false, "rules" => false]
]

Definition at line 29 of file ColumnFactoryTest.php.


The documentation for this class was generated from the following file: