TestCase for Custom transformations.
More...
◆ setUp()
TransformationsCustomTest::setUp |
( |
| ) |
|
|
protected |
Definition at line 16 of file TransformationsCustomTest.php.
18 $this->f =
new Transformation\Factory();
19 $this->custom = $this->f->custom(
21 if (!is_string($value)) {
◆ tearDown()
TransformationsCustomTest::tearDown |
( |
| ) |
|
|
protected |
◆ testInvoke()
TransformationsCustomTest::testInvoke |
( |
| ) |
|
◆ testInvokeFails()
TransformationsCustomTest::testInvokeFails |
( |
| ) |
|
Definition at line 87 of file TransformationsCustomTest.php.
89 $custom = $this->f->custom(
91 if (!is_string($value)) {
100 $lower_string = $custom(array());
102 $this->assertEquals(
"'array' is not a string.", $e->getMessage());
105 $this->assertTrue($raised);
109 $lower_string = $custom(12345);
111 $this->assertEquals(
"'integer' is not a string.", $e->getMessage());
114 $this->assertTrue($raised);
119 $lower_string = $custom($std_class);
121 $this->assertEquals(
"'object' is not a string.", $e->getMessage());
124 $this->assertTrue($raised);
◆ testTransform()
TransformationsCustomTest::testTransform |
( |
| ) |
|
◆ testTransformFails()
TransformationsCustomTest::testTransformFails |
( |
| ) |
|
Definition at line 41 of file TransformationsCustomTest.php.
45 $lower_string = $this->custom->transform(array());
47 $this->assertEquals(
"'array' is not a string.", $e->getMessage());
50 $this->assertTrue($raised);
54 $lower_string = $this->custom->transform(12345);
56 $this->assertEquals(
"'integer' is not a string.", $e->getMessage());
59 $this->assertTrue($raised);
64 $lower_string = $this->custom->transform($std_class);
66 $this->assertEquals(
"'object' is not a string.", $e->getMessage());
69 $this->assertTrue($raised);
◆ TEST_STRING
const TransformationsCustomTest::TEST_STRING = "Test" |
The documentation for this class was generated from the following file: