ILIAS  trunk Revision v11.0_alpha-1811-gd2d5443e411
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ColumnFactoryTest Class Reference
+ Inheritance diagram for ColumnFactoryTest:
+ Collaboration diagram for ColumnFactoryTest:

Public Member Functions

 testDataTableColsImplementInterfaces (\Closure $col)
 getColumnTypeProvider More...
 
- Public Member Functions inherited from AbstractFactoryTestCase
 setUp ()
 
 testProperNamespace ()
 
 testProperName ()
 
 testCheckYamlExtraction (ReflectionMethod $method_reflection, string $name)
 Tests whether the YAML Kitchen Sink info can be parsed. More...
 
 testReturnType (ReflectionMethod $method_reflection, string $name)
 Tests whether the method either returns a factory or a component. More...
 
 testFactoryMethodNameCompatibleDocstring (ReflectionMethod $method_reflection, string $name)
 Tests whether the method name matches the return doctring? More...
 
 testMethodParams (ReflectionMethod $method_reflection, string $name)
 Tests whether methods returning factories have no parameters. More...
 
 testKitchensinkInfoDescription (ReflectionMethod $method_reflection, string $name)
 getMethodsProvider More...
 
 testKitchensinkInfoRivals (ReflectionMethod $method_reflection, string $name)
 getMethodsProvider More...
 
 testKitchensinkInfoBackground (ReflectionMethod $method_reflection, string $name)
 getMethodsProvider More...
 
 testKitchensinkInfoFeatureWiki (ReflectionMethod $method_reflection, string $name)
 getMethodsProvider More...
 
 testKitchensinkInfoJavaScript (ReflectionMethod $method_reflection, string $name)
 getMethodsProvider More...
 
 testKitchensinkInfoRules (ReflectionMethod $method_reflection, string $name)
 getMethodsProvider More...
 
 testKitchensinkInfoContext (ReflectionMethod $method_reflection, string $name)
 getMethodsProvider More...
 
 kitchensinkInfoSettingsMergedWithDefaults (string $name)
 

Static Public Member Functions

static getColumnTypeProvider ()
 
- Static Public Member Functions inherited from AbstractFactoryTestCase
static buildFactoryReflection ()
 
static getMethodsProvider ()
 

Static Public Attributes

static array $kitchensink_info_settings
 
static array rules
 
static string $factory_title = 'ILIAS\\UI\\Component\\Table\\Column\\Factory'
 
- Static Public Attributes inherited from AbstractFactoryTestCase
static string $factory_title = ''
 

Protected Member Functions

 buildColumnFactory ()
 
- Protected Member Functions inherited from AbstractFactoryTestCase
 returnsFactory (array $docstring_data)
 
 returnsComponent (array $docstring_data)
 
 isFactoryName (string $name)
 
 getRegexFactoryNamespace ()
 

Additional Inherited Members

- Data Fields inherited from AbstractFactoryTestCase
const COMPONENT = 1
 
const FACTORY = 2
 

Detailed Description

Definition at line 26 of file ColumnFactoryTest.php.

Member Function Documentation

◆ buildColumnFactory()

ColumnFactoryTest::buildColumnFactory ( )
protected

Definition at line 43 of file ColumnFactoryTest.php.

References $lng.

Referenced by testDataTableColsImplementInterfaces().

44  {
45  $lng = $this->getMockBuilder(\ILIAS\Language\Language::class)
46  ->disableOriginalConstructor()
47  ->getMock();
48  $lng->method('txt')->willReturnCallback(fn($v) => $v);
49 
50  return new \ILIAS\UI\Implementation\Component\Table\Column\Factory($lng);
51  }
Interface Observer Contains several chained tasks and infos about them.
global $lng
Definition: privfeed.php:31
+ Here is the caller graph for this function:

◆ getColumnTypeProvider()

static ColumnFactoryTest::getColumnTypeProvider ( )
static

Definition at line 53 of file ColumnFactoryTest.php.

References Vendor\Package\$f.

53  : array
54  {
55  $date_format = (new Data\Factory())->dateFormat()->germanShort();
56 
57  return [
58  [static fn($f) => [Column\Text::class, $f->text("")]],
59  [static fn($f) => [Column\Text::class, $f->text("")]],
60  [static fn($f) => [Column\Date::class, $f->date("", $date_format)]],
61  [static fn($f) => [Column\TimeSpan::class, $f->timespan("", $date_format)]],
62  [static fn($f) => [Column\Number::class, $f->number("")]],
63  [static fn($f) => [Column\Boolean::class, $f->boolean("", '1', '0')]],
64  [static fn($f) => [Column\Status::class, $f->status("")]],
65  [static fn($f) => [Column\StatusIcon::class, $f->statusIcon("")]],
66  [static fn($f) => [Column\Link::class, $f->link("")]],
67  [static fn($f) => [Column\EMail::class, $f->eMail("")]],
68  [static fn($f) => [Column\LinkListing::class, $f->linkListing("")]]
69  ];
70  }

◆ testDataTableColsImplementInterfaces()

ColumnFactoryTest::testDataTableColsImplementInterfaces ( \Closure  $col)

getColumnTypeProvider

Definition at line 75 of file ColumnFactoryTest.php.

References buildColumnFactory().

75  : void
76  {
77  $factory = $this->buildColumnFactory();
78  list($class, $instance) = $col($factory);
79  $this->assertInstanceOf(Column\Column::class, $instance);
80  $this->assertInstanceOf($class, $instance);
81  }
A Column describes the form of presentation for a certain aspect of data, i.e.
Definition: Column.php:27
+ Here is the call graph for this function:

Field Documentation

◆ $factory_title

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

Definition at line 41 of file ColumnFactoryTest.php.

◆ $kitchensink_info_settings

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

Definition at line 28 of file ColumnFactoryTest.php.

◆ rules

array ColumnFactoryTest::rules
static
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: