Skip to content

Commit

Permalink
Merge pull request PrestaShop#8662 from LittleBigDev/move-cldr-to-core
Browse files Browse the repository at this point in the history
Moved CLDR to Core
  • Loading branch information
LittleBigDev authored Jan 10, 2018
2 parents 91c1792 + 05a6732 commit c8cfe83
Show file tree
Hide file tree
Showing 12 changed files with 35 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* International Registered Trademark & Property of PrestaShop SA
*/

namespace PrestaShopBundle\Localization\Exception;
namespace PrestaShop\PrestaShop\Core\Localization\Exception;

class LocalizationException extends \Exception
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
* International Registered Trademark & Property of PrestaShop SA
*/

namespace PrestaShopBundle\Localization\Number;
namespace PrestaShop\PrestaShop\Core\Localization\Number;

use InvalidArgumentException as SPLInvalidArgumentException;
use PrestaShop\Decimal\Number as DecimalNumber;
use PrestaShop\Decimal\Operation\Rounding;
use PrestaShopBundle\Localization\Exception\LocalizationException;
use PrestaShopBundle\Localization\Specification\NumberInterface as NumberSpecification;
use PrestaShopBundle\Localization\Specification\Price as PriceSpecification;
use PrestaShop\PrestaShop\Core\Localization\Exception\LocalizationException;
use PrestaShop\PrestaShop\Core\Localization\Specification\NumberInterface as NumberSpecification;
use PrestaShop\PrestaShop\Core\Localization\Specification\Price as PriceSpecification;

/**
* Formats a number (raw, price, percentage) according to passed specifications
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* International Registered Trademark & Property of PrestaShop SA
*/

namespace PrestaShopBundle\Localization\Specification;
namespace PrestaShop\PrestaShop\Core\Localization\Specification;

class Locale
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
* International Registered Trademark & Property of PrestaShop SA
*/

namespace PrestaShopBundle\Localization\Specification;
namespace PrestaShop\PrestaShop\Core\Localization\Specification;

use PrestaShopBundle\Localization\Exception\LocalizationException;
use PrestaShop\PrestaShop\Core\Localization\Exception\LocalizationException;

/**
* Number specification class
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* International Registered Trademark & Property of PrestaShop SA
*/

namespace PrestaShopBundle\Localization\Specification;
namespace PrestaShop\PrestaShop\Core\Localization\Specification;

/**
* Number specification class
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
* International Registered Trademark & Property of PrestaShop SA
*/

namespace PrestaShopBundle\Localization\Specification;
namespace PrestaShop\PrestaShop\Core\Localization\Specification;

use PrestaShopBundle\Localization\Exception\LocalizationException;
use PrestaShop\PrestaShop\Core\Localization\Exception\LocalizationException;

/**
* Number's symbols data bag. Regroups all symbols used when formatting a number
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
* International Registered Trademark & Property of PrestaShop SA
*/

namespace PrestaShopBundle\Localization\Specification;
namespace PrestaShop\PrestaShop\Core\Localization\Specification;

use PrestaShopBundle\Localization\Specification\Number as NumberSpecification;
use PrestaShop\PrestaShop\Core\Localization\Specification\Number as NumberSpecification;

/**
* Percentage specification class
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
* International Registered Trademark & Property of PrestaShop SA
*/

namespace PrestaShopBundle\Localization\Specification;
namespace PrestaShop\PrestaShop\Core\Localization\Specification;

use PrestaShopBundle\Localization\Exception\LocalizationException;
use PrestaShopBundle\Localization\Specification\Number as NumberSpecification;
use PrestaShop\PrestaShop\Core\Localization\Exception\LocalizationException;
use PrestaShop\PrestaShop\Core\Localization\Specification\Number as NumberSpecification;

/**
* Price number specification class
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@
* International Registered Trademark & Property of PrestaShop SA
*/

namespace Tests\PrestaShopBundle\Localization\Number;
namespace Tests\Unit\Core\Localization\Number;

use PHPUnit\Framework\TestCase;
use PrestaShop\Decimal\Operation\Rounding;
use PrestaShopBundle\Localization\Exception\LocalizationException;
use PrestaShopBundle\Localization\Number\Formatter;
use PrestaShopBundle\Localization\Specification\Number as NumberSpecification;
use PrestaShopBundle\Localization\Specification\NumberInterface as NumberSpecificationInterface;
use PrestaShopBundle\Localization\Specification\NumberSymbolList;
use PrestaShopBundle\Localization\Specification\Price as PriceSpecification;
use PrestaShop\PrestaShop\Core\Localization\Exception\LocalizationException;
use PrestaShop\PrestaShop\Core\Localization\Number\Formatter;
use PrestaShop\PrestaShop\Core\Localization\Specification\Number as NumberSpecification;
use PrestaShop\PrestaShop\Core\Localization\Specification\NumberInterface as NumberSpecificationInterface;
use PrestaShop\PrestaShop\Core\Localization\Specification\NumberSymbolList;
use PrestaShop\PrestaShop\Core\Localization\Specification\Price as PriceSpecification;

class FormatterTest extends TestCase
{
Expand Down Expand Up @@ -266,7 +266,7 @@ public function provideValidNumberFormatSpecs()
'numberSpecification' => new PriceSpecification(
'¤ #,##0.##',
'-¤ #,##0.##',
['latn' => new NumberSymbolList(',', ' ', ';', '%', '-', '+', 'E', '^', '', '', 'NaN')],
['latn' => new NumberSymbolList('.', ',', ';', '%', '-', '+', 'E', '^', '', '', 'NaN')],
2,
2,
true,
Expand All @@ -280,14 +280,14 @@ public function provideValidNumberFormatSpecs()
'numberingSystem' => 'latn', // Occidental numbering system
],
'number' => -123456.789,
'expected' => '-$ 123 456,79',
'expected' => '-$ 123,456.79',
],
'USA positive price with ISO code' => [
'specs' => [
'numberSpecification' => new PriceSpecification(
'¤ #,##0.##',
'-¤ #,##0.##',
['latn' => new NumberSymbolList(',', ' ', ';', '%', '-', '+', 'E', '^', '', '', 'NaN')],
['latn' => new NumberSymbolList('.', ',', ';', '%', '-', '+', 'E', '^', '', '', 'NaN')],
2,
2,
true,
Expand All @@ -301,7 +301,7 @@ public function provideValidNumberFormatSpecs()
'numberingSystem' => 'latn', // Occidental numbering system
],
'number' => 123456.781,
'expected' => 'USD 123 456,78',
'expected' => 'USD 123,456.78',
],
];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
* International Registered Trademark & Property of PrestaShop SA
*/

namespace Tests\PrestaShopBundle\Localization\Specification;
namespace Tests\Unit\Core\Localization\Specification;

use PHPUnit\Framework\TestCase;
use PrestaShopBundle\Localization\Specification\Number as NumberSpecification;
use PrestaShopBundle\Localization\Specification\NumberSymbolList;
use PrestaShop\PrestaShop\Core\Localization\Specification\Number as NumberSpecification;
use PrestaShop\PrestaShop\Core\Localization\Specification\NumberSymbolList;

class NumberTest extends TestCase
{
Expand Down Expand Up @@ -105,7 +105,7 @@ public function testGetSymbolsByNumberingSystem()
* When asking it a symbols list for a given INVALID numbering system
* Then an exception souhd be raised
*
* @expectedException \PrestaShopBundle\Localization\Exception\LocalizationException
* @expectedException \PrestaShop\PrestaShop\Core\Localization\Exception\LocalizationException
*/
public function testGetSymbolsByNumberingSystemWithInvalidParameter()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
* International Registered Trademark & Property of PrestaShop SA
*/

namespace Tests\PrestaShopBundle\Localization\Specification;
namespace Tests\Unit\Core\Localization\Specification;

use PrestaShopBundle\Localization\Specification\Percentage as PercentageSpecification;
use PrestaShop\PrestaShop\Core\Localization\Specification\Percentage as PercentageSpecification;

class PercentageTest extends NumberTest
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
* International Registered Trademark & Property of PrestaShop SA
*/

namespace Tests\PrestaShopBundle\Localization\Specification;
namespace Tests\Unit\Core\Localization\Specification;

use PrestaShopBundle\Localization\Specification\Price as PriceSpecification;
use PrestaShop\PrestaShop\Core\Localization\Specification\Price as PriceSpecification;

class PriceTest extends NumberTest
{
Expand Down

0 comments on commit c8cfe83

Please sign in to comment.