IcuTestCase.php 957 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Icu\Tests;
  11. use Symfony\Component\Icu\IcuData;
  12. use Symfony\Component\Intl\Intl;
  13. use Symfony\Component\Intl\Util\IcuVersion;
  14. use Symfony\Component\Intl\Util\Version;
  15. /**
  16. * Base test case for the Icu component.
  17. *
  18. * @author Bernhard Schussek <bschussek@gmail.com>
  19. */
  20. abstract class IcuTestCase extends \PHPUnit_Framework_TestCase
  21. {
  22. protected function setUp()
  23. {
  24. if (!Intl::isExtensionLoaded()) {
  25. $this->markTestSkipped('The intl extension is not available.');
  26. }
  27. if (IcuVersion::compare(Intl::getIcuVersion(), '4.4', '<', $precision = 1)) {
  28. $this->markTestSkipped('Please change your ICU version to 4.4 or higher');
  29. }
  30. }
  31. }