Skip to content
Snippets Groups Projects

Issue #3223997: Allow PHP 8

Merged Tim Plunkett requested to merge issue/currency-3223997:3223997-allow-php-8 into 8.x-3.x
All threads resolved!
Files
72
@@ -27,14 +27,14 @@ class IntlTest extends UnitTestCase {
/**
* The locale resolver.
*
* @var \Drupal\currency\LocaleResolverInterface|\PHPUnit_Framework_MockObject_MockObject
* @var \Drupal\currency\LocaleResolverInterface|\PHPUnit\Framework\MockObject\MockObject
*/
protected $localeResolver;
/**
* {@inheritdoc}
*/
public function setUp() {
public function setUp(): void {
$configuration = array();
$plugin_id = $this->randomMachineName();
$plugin_definition = array();
@@ -107,13 +107,13 @@ class IntlTest extends UnitTestCase {
$results = array(
// An amount with no decimals should be formatted without decimals and
// decimal separator.
'123' => '₴-123UAH',
'123' => '₴-123 UAH',
// An amount with three groupings should have two grouping separators. All
// of its three decimals should be formatted, even if the currency only
// has two.
'1234567.890' => '₴-1%234%567@890UAH',
'1234567.890' => '₴-1%234%567@890 UAH',
// An amount with only one decimal should be formatted with only one.
'.3' => '₴-0@3UAH',
'.3' => '₴-0@3 UAH',
);
foreach ($results as $amount=> $expected) {
$formatted = $this->formatter->formatAmount($currency, $amount);
Loading