From 1cbc87222f003b9125078e8010190d30a0e47f35 Mon Sep 17 00:00:00 2001 From: Meritoo Date: Tue, 3 Apr 2018 16:58:54 +0200 Subject: [PATCH] TravisCI - install locales before running tests --- .travis.yml | 4 ++++ tests/Utilities/LocaleTest.php | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/.travis.yml b/.travis.yml index 5cc2936..8e70f7f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,10 @@ php: - 7.0 - 7.1 +before_install: + - sudo apt-get install locales + - sed -i 's/^# de_DE/de_DE/g; s/^# es_ES/es_ES/g; s/^# en_GB/en_GB/g; s/^# en_US/en_US/g; s/^# fr_FR/fr_FR/g; s/^# it_IT/it_IT/g; s/^# pl_PL/pl_PL/g; s/^# ru_RU/ru_RU/g;' /etc/locale.gen && locale-gen + install: - composer install diff --git a/tests/Utilities/LocaleTest.php b/tests/Utilities/LocaleTest.php index b695469..4f84cc1 100644 --- a/tests/Utilities/LocaleTest.php +++ b/tests/Utilities/LocaleTest.php @@ -11,6 +11,7 @@ namespace Meritoo\Common\Test\Utilities; use Generator; use Meritoo\Common\Test\Base\BaseTestCase; use Meritoo\Common\Utilities\Locale; +use ReflectionException; /** * Test case of the useful locale methods @@ -20,6 +21,9 @@ use Meritoo\Common\Utilities\Locale; */ class LocaleTest extends BaseTestCase { + /** + * @throws ReflectionException + */ public function testConstructor() { static::assertHasNoConstructor(Locale::class);