18 $this->f =
new Transformation\Factory();
19 $this->custom = $this->f->custom(
21 if (!is_string($value)) {
37 $result = $this->custom->transform(self::TEST_STRING);
38 $this->assertEquals(self::TEST_STRING,
$result);
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);
74 $custom = $this->f->custom(
76 if (!is_string($value)) {
83 $result = $custom(self::TEST_STRING);
84 $this->assertEquals(self::TEST_STRING,
$result);
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);