$this->defaultLocale = \Locale::
getDefault();
\Locale::
setDefault('en'
);
} protected function tearDown(): void
{ \Locale::
setDefault($this->defaultLocale
);
} public function testTransform() { $transformer =
new PercentToLocalizedStringTransformer(null, null, \NumberFormatter::ROUND_HALFUP
);
$this->
assertEquals('10',
$transformer->
transform(0.1
));
$this->
assertEquals('15',
$transformer->
transform(0.15
));
$this->
assertEquals('12',
$transformer->
transform(0.1234
));
$this->
assertEquals('200',
$transformer->
transform(2
));
} public function testTransformEmpty() { $transformer =
new PercentToLocalizedStringTransformer(null, null, \NumberFormatter::ROUND_HALFUP
);