minor #20052 @expectedException expects FQCN (ro0NL)

This PR was merged into the 3.1 branch.

Discussion
----------

@expectedException expects FQCN

| Q             | A
| ------------- | ---
| Branch?       | 3.1
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | comma-separated list of tickets fixed by the PR, if any
| License       | MIT
| Doc PR        | reference to the documentation PR, if any

Sorry.. almost there :) fixes 1 more false positive in `ObjectNormalizerTest`.

https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/2200 is almost ready :)

Commits
-------

7574a92 fixed expected exception annotations
This commit is contained in:
Fabien Potencier 2016-09-25 09:21:09 -07:00
commit 8330e9e5c5
7 changed files with 10 additions and 11 deletions

View File

@ -32,7 +32,7 @@ class ProxyAdapterTest extends AdapterTestCase
}
/**
* @expectedException Exception
* @expectedException \Exception
* @expectedExceptionMessage OK bar
*/
public function testProxyfiedItem()

View File

@ -46,7 +46,7 @@ class RedisAdapterTest extends AbstractRedisAdapterTest
/**
* @dataProvider provideFailedCreateConnection
* @expectedException Symfony\Component\Cache\Exception\InvalidArgumentException
* @expectedException \Symfony\Component\Cache\Exception\InvalidArgumentException
* @expectedExceptionMessage Redis connection failed
*/
public function testFailedCreateConnection($dsn)
@ -65,7 +65,7 @@ class RedisAdapterTest extends AbstractRedisAdapterTest
/**
* @dataProvider provideInvalidCreateConnection
* @expectedException Symfony\Component\Cache\Exception\InvalidArgumentException
* @expectedException \Symfony\Component\Cache\Exception\InvalidArgumentException
* @expectedExceptionMessage Invalid Redis DSN
*/
public function testInvalidCreateConnection($dsn)

View File

@ -22,7 +22,7 @@ class CacheItemTest extends \PHPUnit_Framework_TestCase
/**
* @dataProvider provideInvalidKey
* @expectedException Symfony\Component\Cache\Exception\InvalidArgumentException
* @expectedException \Symfony\Component\Cache\Exception\InvalidArgumentException
* @expectedExceptionMessage Cache key
*/
public function testInvalidKey($key)

View File

@ -16,7 +16,7 @@ use Symfony\Component\Config\Definition\Builder\BooleanNodeDefinition;
class BooleanNodeDefinitionTest extends \PHPUnit_Framework_TestCase
{
/**
* @expectedException Symfony\Component\Config\Definition\Exception\InvalidDefinitionException
* @expectedException \Symfony\Component\Config\Definition\Exception\InvalidDefinitionException
* @expectedExceptionMessage ->cannotBeEmpty() is not applicable to BooleanNodeDefinition.
*/
public function testCannotBeEmptyThrowsAnException()

View File

@ -92,7 +92,7 @@ class NumericNodeDefinitionTest extends \PHPUnit_Framework_TestCase
}
/**
* @expectedException Symfony\Component\Config\Definition\Exception\InvalidDefinitionException
* @expectedException \Symfony\Component\Config\Definition\Exception\InvalidDefinitionException
* @expectedExceptionMessage ->cannotBeEmpty() is not applicable to NumericNodeDefinition.
*/
public function testCannotBeEmptyThrowsAnException()

View File

@ -15,7 +15,6 @@ use Doctrine\Common\Annotations\AnnotationReader;
use Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor;
use Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor;
use Symfony\Component\PropertyInfo\PropertyInfoExtractor;
use Symfony\Component\Serializer\Exception\UnexpectedValueException;
use Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter;
use Symfony\Component\Serializer\Normalizer\ArrayDenormalizer;
use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer;
@ -546,7 +545,7 @@ class ObjectNormalizerTest extends \PHPUnit_Framework_TestCase
}
/**
* @expectedException UnexpectedValueException
* @expectedException \Symfony\Component\Serializer\Exception\UnexpectedValueException
* @expectedExceptionMessage The type of the "date" attribute for class "Symfony\Component\Serializer\Tests\Normalizer\ObjectOuter" must be one of "DateTimeInterface" ("string" given).
*/
public function testRejectInvalidType()
@ -558,7 +557,7 @@ class ObjectNormalizerTest extends \PHPUnit_Framework_TestCase
}
/**
* @expectedException UnexpectedValueException
* @expectedException \Symfony\Component\Serializer\Exception\UnexpectedValueException
* @expectedExceptionMessage The type of the key "a" must be "int" ("string" given).
*/
public function testRejectInvalidKey()

View File

@ -225,7 +225,7 @@ class InlineTest extends \PHPUnit_Framework_TestCase
/**
* @dataProvider getReservedIndicators
* @expectedException Symfony\Component\Yaml\Exception\ParseException
* @expectedException \Symfony\Component\Yaml\Exception\ParseException
* @expectedExceptionMessage cannot start a plain scalar; you need to quote the scalar.
*/
public function testParseUnquotedScalarStartingWithReservedIndicator($indicator)
@ -240,7 +240,7 @@ class InlineTest extends \PHPUnit_Framework_TestCase
/**
* @dataProvider getScalarIndicators
* @expectedException Symfony\Component\Yaml\Exception\ParseException
* @expectedException \Symfony\Component\Yaml\Exception\ParseException
* @expectedExceptionMessage cannot start a plain scalar; you need to quote the scalar.
*/
public function testParseUnquotedScalarStartingWithScalarIndicator($indicator)