Split GH Actions and fix variable reference in Customization class.
This commit is contained in:
parent
0953182033
commit
ed835051e2
|
@ -9,8 +9,8 @@ jobs:
|
|||
- uses: actions/checkout@v1
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Run test suite
|
||||
|
||||
- name: Set up test environment
|
||||
run: |
|
||||
cp azuracast.sample.env azuracast.env
|
||||
cp docker-compose.sample.yml docker-compose.yml
|
||||
|
@ -18,6 +18,9 @@ jobs:
|
|||
chmod 777 tests/_output/
|
||||
docker-compose build web
|
||||
docker-compose run --user="azuracast" --rm web azuracast_install
|
||||
|
||||
- name: Run test suite
|
||||
run: |
|
||||
docker-compose run --user="azuracast" --rm web composer test
|
||||
|
||||
- name: Echo test output directory
|
||||
|
|
|
@ -120,7 +120,7 @@ class Customization
|
|||
|
||||
// Use approximate match if available.
|
||||
foreach ($supported_locales as $lang_code => $lang_name) {
|
||||
if (strcmp(substr($browser_locale, 0, 2), substr($lang_code, 0, 2)) == 0) {
|
||||
if (strpos($exact_locale, substr($lang_code, 0, 2)) === 0) {
|
||||
return $lang_code;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue