minor #37828 use expectWarning() when possible (xabbuh)
This PR was merged into the 3.4 branch.
Discussion
----------
use expectWarning() when possible
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
Commits
-------
26dd39eb06
use expectWarning() when possible
This commit is contained in:
commit
30d8496921
@ -324,7 +324,11 @@ abstract class AbstractNumberFormatterTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testFormatTypeCurrency($formatter, $value)
|
public function testFormatTypeCurrency($formatter, $value)
|
||||||
{
|
{
|
||||||
$this->expectException(Warning::class);
|
if (method_exists($this, 'expectWarning')) {
|
||||||
|
$this->expectWarning();
|
||||||
|
} else {
|
||||||
|
$this->expectException(Warning::class);
|
||||||
|
}
|
||||||
|
|
||||||
$formatter->format($value, NumberFormatter::TYPE_CURRENCY);
|
$formatter->format($value, NumberFormatter::TYPE_CURRENCY);
|
||||||
}
|
}
|
||||||
@ -701,7 +705,11 @@ abstract class AbstractNumberFormatterTest extends TestCase
|
|||||||
|
|
||||||
public function testParseTypeDefault()
|
public function testParseTypeDefault()
|
||||||
{
|
{
|
||||||
$this->expectException(Warning::class);
|
if (method_exists($this, 'expectWarning')) {
|
||||||
|
$this->expectWarning();
|
||||||
|
} else {
|
||||||
|
$this->expectException(Warning::class);
|
||||||
|
}
|
||||||
|
|
||||||
$formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL);
|
$formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL);
|
||||||
$formatter->parse('1', NumberFormatter::TYPE_DEFAULT);
|
$formatter->parse('1', NumberFormatter::TYPE_DEFAULT);
|
||||||
@ -821,7 +829,11 @@ abstract class AbstractNumberFormatterTest extends TestCase
|
|||||||
|
|
||||||
public function testParseTypeCurrency()
|
public function testParseTypeCurrency()
|
||||||
{
|
{
|
||||||
$this->expectException(Warning::class);
|
if (method_exists($this, 'expectWarning')) {
|
||||||
|
$this->expectWarning();
|
||||||
|
} else {
|
||||||
|
$this->expectException(Warning::class);
|
||||||
|
}
|
||||||
|
|
||||||
$formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL);
|
$formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL);
|
||||||
$formatter->parse('1', NumberFormatter::TYPE_CURRENCY);
|
$formatter->parse('1', NumberFormatter::TYPE_CURRENCY);
|
||||||
|
Reference in New Issue
Block a user