diff --git a/.flintci.yml b/.flintci.yml index 332edf2d..8258ef2e 100644 --- a/.flintci.yml +++ b/.flintci.yml @@ -2,3 +2,4 @@ services: composernormalize: true phpcsfixer: true yamllint: true + xmllint: true diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 43017ef4..bd518904 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,4 +1,7 @@ +## Subject + + - -## Subject - - diff --git a/tests/autoload.php.dist b/tests/autoload.php.dist index bd3d1781..cbba4048 100644 --- a/tests/autoload.php.dist +++ b/tests/autoload.php.dist @@ -2,11 +2,9 @@ // if the bundle is within a symfony project, try to reuse the project's autoload -$files = array( +$files = [ __DIR__.'/../vendor/autoload.php', - __DIR__.'/../../../../app/autoload.php', - __DIR__.'/../../../../apps/autoload.php', -); +]; $autoload = false; foreach ($files as $file) { diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 202644fc..da772a77 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -4,13 +4,32 @@ * This file is part of the Sonata Project package. * * (c) Thomas Rabaix - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. +* +* For the full copyright and license information, please view the LICENSE +* file that was distributed with this source code. +*/ + +/* + * fix encoding issue while running text on different host with different locale configuration */ +setlocale(LC_ALL, 'en_US.UTF-8'); if (file_exists($file = __DIR__.'/autoload.php')) { require_once $file; } elseif (file_exists($file = __DIR__.'/autoload.php.dist')) { require_once $file; } + +/* + * try to get Symfony's PHPUnit Bridge + */ +$files = array_filter([ + __DIR__.'/../vendor/symfony/symfony/src/Symfony/Bridge/PhpUnit/bootstrap.php', + __DIR__.'/../vendor/symfony/phpunit-bridge/bootstrap.php', + __DIR__.'/../../../../vendor/symfony/symfony/src/Symfony/Bridge/PhpUnit/bootstrap.php', + __DIR__.'/../../../../vendor/symfony/phpunit-bridge/bootstrap.php', +], 'file_exists'); + +if ($files) { + require_once current($files); +}