ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ColumnFactoryTest Class Reference
+ Inheritance diagram for ColumnFactoryTest:
+ Collaboration diagram for ColumnFactoryTest:

Public Member Functions

 testDataTableColsImplementInterfaces (\Closure $col)
 
- 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)
 
 testKitchensinkInfoRivals (ReflectionMethod $method_reflection, string $name)
 
 testKitchensinkInfoBackground (ReflectionMethod $method_reflection, string $name)
 
 testKitchensinkInfoFeatureWiki (ReflectionMethod $method_reflection, string $name)
 
 testKitchensinkInfoJavaScript (ReflectionMethod $method_reflection, string $name)
 
 testKitchensinkInfoRules (ReflectionMethod $method_reflection, string $name)
 
 testKitchensinkInfoContext (ReflectionMethod $method_reflection, string $name)
 
 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 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 44 of file ColumnFactoryTest.php.

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

References $lng.

Referenced by testDataTableColsImplementInterfaces().

+ Here is the caller graph for this function:

◆ getColumnTypeProvider()

static ColumnFactoryTest::getColumnTypeProvider ( )
static

Definition at line 54 of file ColumnFactoryTest.php.

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

References Vendor\Package\$f.

◆ testDataTableColsImplementInterfaces()

ColumnFactoryTest::testDataTableColsImplementInterfaces ( \Closure  $col)

Definition at line 74 of file ColumnFactoryTest.php.

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

References buildColumnFactory().

+ 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 42 of file ColumnFactoryTest.php.

◆ $kitchensink_info_settings

array ColumnFactoryTest::$kitchensink_info_settings
static
Initial value:
= [
"text" => ["context" => false, "rules" => 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],
"breadcrumb" => ["context" => false, "rules" => false],
]

Definition at line 28 of file ColumnFactoryTest.php.


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