TestCase for SplitString transformations.
More...
|
static | $result = array("I am", "a test string", "for split") |
|
◆ setUp()
SplitStringTest::setUp |
( |
| ) |
|
|
protected |
Definition at line 23 of file SplitStringTest.php.
25 $dataFactory = new \ILIAS\Data\Factory();
26 $language = $this->createMock(
'\ilLanguage');
27 $this->f = new \ILIAS\Refinery\Factory($dataFactory, $language);
28 $this->split_string = $this->f->string()->splitString(
"#");
◆ tearDown()
SplitStringTest::tearDown |
( |
| ) |
|
|
protected |
◆ testApplyToWithInvalidValueWillLeadToErrorResult()
SplitStringTest::testApplyToWithInvalidValueWillLeadToErrorResult |
( |
| ) |
|
Definition at line 123 of file SplitStringTest.php.
References $factory.
125 $factory = new \ILIAS\Data\Factory();
128 $resultObject = $this->split_string->applyTo($valueObject);
130 $this->assertTrue($resultObject->isError());
◆ testApplyToWithValidValueReturnsAnOkResult()
SplitStringTest::testApplyToWithValidValueReturnsAnOkResult |
( |
| ) |
|
Definition at line 112 of file SplitStringTest.php.
References $factory, and $result.
114 $factory = new \ILIAS\Data\Factory();
115 $valueObject =
$factory->ok(self::STRING_TO_SPLIT);
117 $resultObject = $this->split_string->applyTo($valueObject);
120 $this->assertFalse($resultObject->isError());
◆ testInvoke()
SplitStringTest::testInvoke |
( |
| ) |
|
◆ testInvokeFails()
SplitStringTest::testInvokeFails |
( |
| ) |
|
◆ testTransform()
SplitStringTest::testTransform |
( |
| ) |
|
◆ testTransformFails()
SplitStringTest::testTransformFails |
( |
| ) |
|
Definition at line 43 of file SplitStringTest.php.
References Vendor\Package\$e.
48 $next_arr = $this->split_string->transform($arr);
52 $this->assertTrue($raised);
57 $with = $this->split_string->transform($without);
61 $this->assertTrue($raised);
66 $with = $this->split_string->transform($std_class);
70 $this->assertTrue($raised);
◆ $result
SplitStringTest::$result = array("I am", "a test string", "for split") |
|
staticprotected |
◆ $split_string
SplitStringTest::$split_string |
|
private |
◆ STRING_TO_SPLIT
const SplitStringTest::STRING_TO_SPLIT = "I am#a test string#for split" |
The documentation for this class was generated from the following file: