minor #17639 [appveyor] Fix failure reporting (nicolas-grekas)

This PR was merged into the 2.3 branch.

Discussion
----------

[appveyor] Fix failure reporting

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #17464
| License       | MIT
| Doc PR        | -

Status: needs work

Commits
-------

b58f483 [appveyor] Fix failure reporting
This commit is contained in:
Nicolas Grekas 2016-02-01 21:44:24 +01:00
commit de6e3c81d8
5 changed files with 18 additions and 5 deletions

View File

@ -52,7 +52,7 @@ install:
- if [[ $deps != skip ]]; then COMPONENTS=$(find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist -printf '%h\n'); fi;
- if [[ $deps != skip && $deps ]]; then php .travis.php $TRAVIS_COMMIT_RANGE $TRAVIS_BRANCH $COMPONENTS; fi;
- if [[ $deps = high && $TRAVIS_BRANCH = master ]]; then SYMFONY_VERSION=$(git ls-remote --heads | grep -o '/[1-9].*' | tail -n 1 | sed s/.//); else SYMFONY_VERSION=$(cat composer.json | grep '^ *"dev-master". *"[1-9]' | grep -o '[0-9.]*'); fi;
- if [[ $deps = high && $TRAVIS_BRANCH = master ]]; then git fetch origin $SYMFONY_VERSION; git checkout -m FETCH_HEAD; fi;
- if [[ $deps = high && $TRAVIS_BRANCH = master ]]; then git fetch origin $SYMFONY_VERSION; git checkout -m FETCH_HEAD; COMPONENTS=$(find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist -printf '%h\n'); fi;
- if [[ $deps = high && ${SYMFONY_VERSION%.*} != $(git show $(git ls-remote --heads | grep -FA1 /$SYMFONY_VERSION | tail -n 1):composer.json | grep '^ *"dev-master". *"[1-9]' | grep -o '[0-9]*' | head -n 1) ]]; then LEGACY=,legacy; fi;
- export COMPOSER_ROOT_VERSION=$SYMFONY_VERSION.x-dev;
- if [[ ! $deps ]]; then composer update --prefer-dist; else export SYMFONY_DEPRECATIONS_HELPER=weak; fi;

View File

@ -14,6 +14,7 @@ init:
- SET PHP=1
- SET ANSICON=121x90 (121x90)
- SET SYMFONY_PHPUNIT_SKIPPED_TESTS=phpunit.skipped
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Command Processor" /v DelayedExpansion /t REG_DWORD /d 1 /f
install:
- IF EXIST c:\php (SET PHP=0) ELSE (mkdir c:\php)
@ -57,7 +58,6 @@ install:
test_script:
- cd c:\projects\symfony
- Setlocal EnableDelayedExpansion
- SET X=0
- copy /Y c:\php\php.ini-min c:\php\php.ini
- php phpunit symfony --exclude-group benchmark,intl-data || SET X=!errorlevel!

View File

@ -24,6 +24,15 @@ use Symfony\Component\Security\Core\Util\SecureRandom;
class PersistentTokenBasedRememberMeServicesTest extends \PHPUnit_Framework_TestCase
{
public static function setUpBeforeClass()
{
try {
random_bytes(1);
} catch (\Exception $e) {
throw new \PHPUnit_Framework_SkippedTestError($e->getMessage());
}
}
public function testAutoLoginReturnsNullWhenNoCookie()
{
$service = $this->getService(null, array('name' => 'foo'));

View File

@ -59,6 +59,10 @@ class CustomNormalizer extends SerializerAwareNormalizer implements NormalizerIn
*/
public function supportsDenormalization($data, $type, $format = null)
{
if (PHP_VERSION_ID < 50307) {
return class_exists($type) && in_array('Symfony\Component\Serializer\Normalizer\DenormalizableInterface', class_implements($type), true);
}
return is_subclass_of($type, 'Symfony\Component\Serializer\Normalizer\DenormalizableInterface');
}
}

View File

@ -255,12 +255,12 @@ class TranslatorTest extends \PHPUnit_Framework_TestCase
$resources = $catalogues['en']->getResources();
$this->assertCount(1, $resources);
$this->assertContains( __DIR__.'/fixtures/resources.yml', $resources);
$this->assertContains( __DIR__.DIRECTORY_SEPARATOR.'fixtures'.DIRECTORY_SEPARATOR.'resources.yml', $resources);
$resources = $catalogues['en_GB']->getResources();
$this->assertCount(2, $resources);
$this->assertContains( __DIR__.'/fixtures/empty.yml', $resources);
$this->assertContains( __DIR__.'/fixtures/resources.yml', $resources);
$this->assertContains( __DIR__.DIRECTORY_SEPARATOR.'fixtures'.DIRECTORY_SEPARATOR.'empty.yml', $resources);
$this->assertContains( __DIR__.DIRECTORY_SEPARATOR.'fixtures'.DIRECTORY_SEPARATOR.'resources.yml', $resources);
}
/**