diff --git a/tests/Form/DataTransformer/ToStringTest.php b/tests/Form/DataTransformer/ToStringTest.php index 7a20a78..1fe05ca 100644 --- a/tests/Form/DataTransformer/ToStringTest.php +++ b/tests/Form/DataTransformer/ToStringTest.php @@ -12,9 +12,22 @@ class ToStringTest extends TestCase { public function testInvalidReverseTransform(): void + { + $this->invalidReverseTransform(new stdClass()); + } + + public function testInvalidCronReverseTransform(): void + { + $this->invalidReverseTransform('* * * * * *'); + } + + /** + * @param mixed $value + */ + protected function invalidReverseTransform($value): void { $transformer = new CronExpressionToStringTransformer(); $this->expectException(TransformationFailedException::class); - $transformer->reverseTransform(new stdClass()); + $transformer->reverseTransform($value); } }