use Symfony\Component\Form\Exception\TransformationFailedException;
use Symfony\Component\Form\Extension\Core\DataTransformer\BooleanToStringTransformer;
class BooleanToStringTransformerTest extends TestCase
{ private const TRUE_VALUE = '1';
protected BooleanToStringTransformer
$transformer;
protected function setUp(): void
{ $this->transformer =
new BooleanToStringTransformer(self::TRUE_VALUE
);
} public function testTransform() { $this->
assertEquals(self::TRUE_VALUE,
$this->transformer->
transform(true
));
$this->
assertNull($this->transformer->
transform(false
));
} // https://github.com/symfony/symfony/issues/8989
public function testTransformAcceptsNull() {