Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Soft..
Decoded Output download
<?php
/**
* @link https://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license https://www.yiiframework.com/license/
*/
namespace yiiunitramework\i18n;
use yii\i18n\Locale;
use yiiunit\TestCase;
/**
* @group i18n
*/
class LocaleTest extends TestCase
{
/**
* @var Locale
*/
protected $locale;
protected function setUp(): void
{
parent::setUp();
$this->mockApplication([
'timeZone' => 'UTC',
'language' => 'ru-RU',
]);
$this->locale = new Locale(['locale' => 'en-US']);
}
protected function tearDown(): void
{
parent::tearDown();
$this->locale = null;
}
public function testGetCurrencyCode()
{
$this->locale->locale = 'de-DE';
$this->assertSame('', $this->locale->getCurrencySymbol('EUR'));
$this->assertSame('', $this->locale->getCurrencySymbol());
$this->locale->locale = 'ru-RU';
$this->assertIsOneOf($this->locale->getCurrencySymbol('RUR'), ['.', '', '.']);
$this->assertIsOneOf($this->locale->getCurrencySymbol(), ['.', '', '.']);
}
}
?>
Did this file decode correctly?
Original Code
<?php
/**
* @link https://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license https://www.yiiframework.com/license/
*/
namespace yiiunit\framework\i18n;
use yii\i18n\Locale;
use yiiunit\TestCase;
/**
* @group i18n
*/
class LocaleTest extends TestCase
{
/**
* @var Locale
*/
protected $locale;
protected function setUp(): void
{
parent::setUp();
$this->mockApplication([
'timeZone' => 'UTC',
'language' => 'ru-RU',
]);
$this->locale = new Locale(['locale' => 'en-US']);
}
protected function tearDown(): void
{
parent::tearDown();
$this->locale = null;
}
public function testGetCurrencyCode()
{
$this->locale->locale = 'de-DE';
$this->assertSame('', $this->locale->getCurrencySymbol('EUR'));
$this->assertSame('', $this->locale->getCurrencySymbol());
$this->locale->locale = 'ru-RU';
$this->assertIsOneOf($this->locale->getCurrencySymbol('RUR'), ['.', '', '.']);
$this->assertIsOneOf($this->locale->getCurrencySymbol(), ['.', '', '.']);
}
}
Function Calls
None |
Stats
MD5 | 7bd871d163b2d6fb0c9514e9a85e8f0c |
Eval Count | 0 |
Decode Time | 95 ms |