Definition at line 26 of file CaseOfLabelTest.php.
◆ setUp()
CaseOfLabelTest::setUp |
( |
| ) |
|
|
protected |
Definition at line 40 of file CaseOfLabelTest.php.
44 $language = $this->createMock(
ILIAS\Language\Language::class);
46 $this->f =
new Refinery($dataFactory, $language);
47 $this->case_of_label_if_possible = $this->f->string()->caseOfLabel(self::LANGUAGE_KEY);
Interface Observer Contains several chained tasks and infos about them.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ tearDown()
CaseOfLabelTest::tearDown |
( |
| ) |
|
|
protected |
Definition at line 50 of file CaseOfLabelTest.php.
References null.
53 $this->case_of_label_if_possible =
null;
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
◆ testApplyToWithInvalidValueWillLeadToErrorResult()
CaseOfLabelTest::testApplyToWithInvalidValueWillLeadToErrorResult |
( |
| ) |
|
Definition at line 161 of file CaseOfLabelTest.php.
165 $valueObject = $factory->ok(42);
167 $resultObject = $this->case_of_label_if_possible->applyTo($valueObject);
169 $this->assertTrue($resultObject->isError());
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ testApplyToWithValidValueReturnsAnOkResult()
CaseOfLabelTest::testApplyToWithValidValueReturnsAnOkResult |
( |
| ) |
|
Definition at line 149 of file CaseOfLabelTest.php.
153 $valueObject = $factory->ok(self::TEST_STRING_1);
155 $resultObject = $this->case_of_label_if_possible->applyTo($valueObject);
157 $this->assertEquals(self::EXPECTED_RESULT_TEST_STRING_1, $resultObject->value());
158 $this->assertFalse($resultObject->isError());
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ testInvoke()
CaseOfLabelTest::testInvoke |
( |
| ) |
|
Definition at line 108 of file CaseOfLabelTest.php.
References $case_of_label_if_possible.
110 $this->case_of_label_if_possible = $this->f->string()->caseOfLabel(self::LANGUAGE_KEY);
114 $this->assertEquals(self::EXPECTED_RESULT_TEST_STRING_1, $str);
Transformation $case_of_label_if_possible
◆ testInvokeFails()
CaseOfLabelTest::testInvokeFails |
( |
| ) |
|
Definition at line 117 of file CaseOfLabelTest.php.
References $case_of_label_if_possible, and Vendor\Package\$e.
119 $this->case_of_label_if_possible = $this->f->string()->caseOfLabel(self::LANGUAGE_KEY);
128 $this->assertTrue($raised);
137 $this->assertTrue($raised);
146 $this->assertTrue($raised);
Transformation $case_of_label_if_possible
◆ testTransform1()
CaseOfLabelTest::testTransform1 |
( |
| ) |
|
Definition at line 56 of file CaseOfLabelTest.php.
58 $str = $this->case_of_label_if_possible->transform(self::TEST_STRING_1);
60 $this->assertEquals(self::EXPECTED_RESULT_TEST_STRING_1, $str);
◆ testTransform2()
CaseOfLabelTest::testTransform2 |
( |
| ) |
|
Definition at line 63 of file CaseOfLabelTest.php.
65 $str = $this->case_of_label_if_possible->transform(self::TEST_STRING_2);
67 $this->assertEquals(self::EXPECTED_RESULT_TEST_STRING_2, $str);
◆ testTransform3()
CaseOfLabelTest::testTransform3 |
( |
| ) |
|
Definition at line 71 of file CaseOfLabelTest.php.
73 $str = $this->case_of_label_if_possible->transform(self::TEST_STRING_3);
75 $this->assertEquals(self::EXPECTED_RESULT_TEST_STRING_3, $str);
◆ testTransformFails()
CaseOfLabelTest::testTransformFails |
( |
| ) |
|
Definition at line 78 of file CaseOfLabelTest.php.
References Vendor\Package\$e.
83 $next_str = $this->case_of_label_if_possible->transform($arr);
87 $this->assertTrue($raised);
92 $next_str = $this->case_of_label_if_possible->transform($int);
96 $this->assertTrue($raised);
101 $next_str = $this->case_of_label_if_possible->transform($std_class);
105 $this->assertTrue($raised);
◆ testUnknownLanguageKey()
CaseOfLabelTest::testUnknownLanguageKey |
( |
| ) |
|
Definition at line 172 of file CaseOfLabelTest.php.
References Vendor\Package\$e.
174 $this->case_of_label_if_possible = $this->f->string()->caseOfLabel(self::SENSELESS_LANGUAGE_KEY);
178 $str = $this->case_of_label_if_possible->transform(self::TEST_STRING_1);
182 $this->assertTrue($raised);
◆ $case_of_label_if_possible
◆ $f
Refinery CaseOfLabelTest::$f |
|
private |
◆ EXPECTED_RESULT_TEST_STRING_1
const CaseOfLabelTest::EXPECTED_RESULT_TEST_STRING_1 = "I Am a Test String for the Title Capitalization and I Hope that Works even if It Is Complicated :)" |
|
private |
◆ EXPECTED_RESULT_TEST_STRING_2
const CaseOfLabelTest::EXPECTED_RESULT_TEST_STRING_2 = "I Switch the Computer on and Go Online" |
|
private |
◆ EXPECTED_RESULT_TEST_STRING_3
const CaseOfLabelTest::EXPECTED_RESULT_TEST_STRING_3 = "Now It Is Working" |
|
private |
◆ LANGUAGE_KEY
const CaseOfLabelTest::LANGUAGE_KEY = "en" |
|
private |
◆ SENSELESS_LANGUAGE_KEY
const CaseOfLabelTest::SENSELESS_LANGUAGE_KEY = "this_language_key_will_never_exist" |
|
private |
◆ TEST_STRING_1
const CaseOfLabelTest::TEST_STRING_1 = "I am a test string for the title capitalization and I hope that works even if it is complicated :)" |
|
private |
◆ TEST_STRING_2
const CaseOfLabelTest::TEST_STRING_2 = "I switch the computer on and go online" |
|
private |
◆ TEST_STRING_3
const CaseOfLabelTest::TEST_STRING_3 = "Now it is working" |
|
private |
The documentation for this class was generated from the following file: