fixed expected exception annotations

This commit is contained in:
Roland Franssen 2016-09-25 08:27:07 +00:00
parent 90f6b30f81
commit 7574a92498
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 * @expectedExceptionMessage OK bar
*/ */
public function testProxyfiedItem() public function testProxyfiedItem()

View File

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

View File

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

View File

@ -16,7 +16,7 @@ use Symfony\Component\Config\Definition\Builder\BooleanNodeDefinition;
class BooleanNodeDefinitionTest extends \PHPUnit_Framework_TestCase 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. * @expectedExceptionMessage ->cannotBeEmpty() is not applicable to BooleanNodeDefinition.
*/ */
public function testCannotBeEmptyThrowsAnException() 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. * @expectedExceptionMessage ->cannotBeEmpty() is not applicable to NumericNodeDefinition.
*/ */
public function testCannotBeEmptyThrowsAnException() 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\PhpDocExtractor;
use Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor; use Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor;
use Symfony\Component\PropertyInfo\PropertyInfoExtractor; use Symfony\Component\PropertyInfo\PropertyInfoExtractor;
use Symfony\Component\Serializer\Exception\UnexpectedValueException;
use Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter; use Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter;
use Symfony\Component\Serializer\Normalizer\ArrayDenormalizer; use Symfony\Component\Serializer\Normalizer\ArrayDenormalizer;
use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer; 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). * @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() 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). * @expectedExceptionMessage The type of the key "a" must be "int" ("string" given).
*/ */
public function testRejectInvalidKey() public function testRejectInvalidKey()

View File

@ -225,7 +225,7 @@ class InlineTest extends \PHPUnit_Framework_TestCase
/** /**
* @dataProvider getReservedIndicators * @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. * @expectedExceptionMessage cannot start a plain scalar; you need to quote the scalar.
*/ */
public function testParseUnquotedScalarStartingWithReservedIndicator($indicator) public function testParseUnquotedScalarStartingWithReservedIndicator($indicator)
@ -240,7 +240,7 @@ class InlineTest extends \PHPUnit_Framework_TestCase
/** /**
* @dataProvider getScalarIndicators * @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. * @expectedExceptionMessage cannot start a plain scalar; you need to quote the scalar.
*/ */
public function testParseUnquotedScalarStartingWithScalarIndicator($indicator) public function testParseUnquotedScalarStartingWithScalarIndicator($indicator)