TestCase for AddLabel transformations.
More...
◆ setUp()
Definition at line 23 of file AddLabelTest.php.
26 $language = $this->createMock(
'\ilLanguage');
29 $this->add_label = $this->f->container()->addLabels(self::$labels);
◆ tearDown()
AddLabelTest::tearDown |
( |
| ) |
|
|
protected |
◆ testInvoke()
AddLabelTest::testInvoke |
( |
| ) |
|
Definition at line 83 of file AddLabelTest.php.
85 $add_label = $this->f->container()->addLabels(self::$labels);
86 $with = $add_label(self::$test_array);
87 $this->assertEquals(self::$result_array, $with);
◆ testInvokeFails()
AddLabelTest::testInvokeFails |
( |
| ) |
|
Definition at line 90 of file AddLabelTest.php.
References Vendor\Package\$e.
92 $add_label = $this->f->container()->addLabels(self::$labels);
97 $next_with = $add_label($with);
101 $this->assertTrue($raised);
105 $without = array(1, 2, 3, 4);
106 $with = $add_label($without);
110 $this->assertTrue($raised);
114 $without =
"1, 2, 3";
115 $with = $add_label($without);
119 $this->assertTrue($raised);
123 $std_class =
new stdClass();
124 $with = $add_label($std_class);
128 $this->assertTrue($raised);
◆ testTransform()
AddLabelTest::testTransform |
( |
| ) |
|
Definition at line 38 of file AddLabelTest.php.
40 $with = $this->add_label->transform(self::$test_array);
41 $this->assertEquals(self::$result_array, $with);
◆ testTransformFails()
AddLabelTest::testTransformFails |
( |
| ) |
|
Definition at line 44 of file AddLabelTest.php.
References Vendor\Package\$e.
49 $next_with = $this->add_label->transform($with);
53 $this->assertTrue($raised);
57 $without = array(1, 2, 3, 4);
58 $with = $this->add_label->transform($without);
62 $this->assertTrue($raised);
67 $with = $this->add_label->transform($without);
71 $this->assertTrue($raised);
75 $std_class =
new stdClass();
76 $with = $this->add_label->transform($std_class);
80 $this->assertTrue($raised);
◆ $f
◆ $labels
AddLabelTest::$labels = array("A", "B", "C") |
|
staticprotected |
◆ $result_array
AddLabelTest::$result_array = array("A" => 1, "B" => 2, "C" => 3) |
|
staticprotected |
◆ $test_array
AddLabelTest::$test_array = array(1, 2, 3) |
|
staticprotected |
The documentation for this class was generated from the following file: