diff --git a/tests/Symfony/Tests/Components/Console/ApplicationTest.php b/tests/Symfony/Tests/Components/Console/ApplicationTest.php
index adf84e9c2f..a1e4b05e5a 100644
--- a/tests/Symfony/Tests/Components/Console/ApplicationTest.php
+++ b/tests/Symfony/Tests/Components/Console/ApplicationTest.php
@@ -111,7 +111,7 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->getCommand() throws an \InvalidArgumentException if the command does not exist');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->getCommand() throws an \InvalidArgumentException if the command does not exist');
$this->assertEquals('The command "foofoo" does not exist.', $e->getMessage(), '->getCommand() throws an \InvalidArgumentException if the command does not exist');
}
@@ -145,7 +145,7 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->findNamespace() throws an \InvalidArgumentException if the abbreviation is ambiguous');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->findNamespace() throws an \InvalidArgumentException if the abbreviation is ambiguous');
$this->assertEquals('The namespace "f" is ambiguous (foo, foo1).', $e->getMessage(), '->findNamespace() throws an \InvalidArgumentException if the abbreviation is ambiguous');
}
@@ -156,7 +156,7 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->findNamespace() throws an \InvalidArgumentException if no command is in the given namespace');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->findNamespace() throws an \InvalidArgumentException if no command is in the given namespace');
$this->assertEquals('There are no commands defined in the "bar" namespace.', $e->getMessage(), '->findNamespace() throws an \InvalidArgumentException if no command is in the given namespace');
}
}
@@ -181,7 +181,7 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->findCommand() throws an \InvalidArgumentException if the abbreviation is ambiguous for a namespace');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->findCommand() throws an \InvalidArgumentException if the abbreviation is ambiguous for a namespace');
$this->assertEquals('Command "f" is not defined.', $e->getMessage(), '->findCommand() throws an \InvalidArgumentException if the abbreviation is ambiguous for a namespace');
}
@@ -192,7 +192,7 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->findCommand() throws an \InvalidArgumentException if the abbreviation is ambiguous for an alias');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->findCommand() throws an \InvalidArgumentException if the abbreviation is ambiguous for an alias');
$this->assertEquals('Command "a" is ambiguous (afoobar, afoobar1 and 1 more).', $e->getMessage(), '->findCommand() throws an \InvalidArgumentException if the abbreviation is ambiguous for an alias');
}
@@ -203,7 +203,7 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->findCommand() throws an \InvalidArgumentException if the abbreviation is ambiguous for a command');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->findCommand() throws an \InvalidArgumentException if the abbreviation is ambiguous for a command');
$this->assertEquals('Command "foo:b" is ambiguous (foo:bar, foo:bar1).', $e->getMessage(), '->findCommand() throws an \InvalidArgumentException if the abbreviation is ambiguous for a command');
}
}
@@ -226,7 +226,7 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\Exception', $e, '->setCatchExceptions() sets the catch exception flag');
+ $this->assertInstanceOf('\Exception', $e, '->setCatchExceptions() sets the catch exception flag');
$this->assertEquals('Command "foo" is not defined.', $e->getMessage(), '->setCatchExceptions() sets the catch exception flag');
}
}
diff --git a/tests/Symfony/Tests/Components/Console/Command/CommandTest.php b/tests/Symfony/Tests/Components/Console/Command/CommandTest.php
index 6fadf49dfb..58290f1add 100644
--- a/tests/Symfony/Tests/Components/Console/Command/CommandTest.php
+++ b/tests/Symfony/Tests/Components/Console/Command/CommandTest.php
@@ -43,7 +43,7 @@ class CommandTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\LogicException', $e, '__construct() throws a \LogicException if the name is null');
+ $this->assertInstanceOf('\LogicException', $e, '__construct() throws a \LogicException if the name is null');
$this->assertEquals('The command name cannot be empty.', $e->getMessage(), '__construct() throws a \LogicException if the name is null');
}
$command = new Command('foo:bar');
@@ -111,7 +111,7 @@ class CommandTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->setName() throws an \InvalidArgumentException if the name is empty');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->setName() throws an \InvalidArgumentException if the name is empty');
$this->assertEquals('A command name cannot be empty.', $e->getMessage(), '->setName() throws an \InvalidArgumentException if the name is empty');
}
@@ -122,7 +122,7 @@ class CommandTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->setName() throws an \InvalidArgumentException if the name is empty');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->setName() throws an \InvalidArgumentException if the name is empty');
$this->assertEquals('A command name cannot be empty.', $e->getMessage(), '->setName() throws an \InvalidArgumentException if the name is empty');
}
}
@@ -214,7 +214,7 @@ class CommandTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->run() throws a \InvalidArgumentException when the input does not validate the current InputDefinition');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->run() throws a \InvalidArgumentException when the input does not validate the current InputDefinition');
$this->assertEquals('The "--bar" option does not exist.', $e->getMessage(), '->run() throws a \InvalidArgumentException when the input does not validate the current InputDefinition');
}
@@ -229,7 +229,7 @@ class CommandTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\LogicException', $e, '->run() throws a \LogicException if the execute() method has not been overriden and no code has been provided');
+ $this->assertInstanceOf('\LogicException', $e, '->run() throws a \LogicException if the execute() method has not been overriden and no code has been provided');
$this->assertEquals('You must override the execute() method in the concrete command class.', $e->getMessage(), '->run() throws a \LogicException if the execute() method has not been overriden and no code has been provided');
}
}
diff --git a/tests/Symfony/Tests/Components/Console/Input/ArgvInputTest.php b/tests/Symfony/Tests/Components/Console/Input/ArgvInputTest.php
index aea04f2959..5030261ca6 100644
--- a/tests/Symfony/Tests/Components/Console/Input/ArgvInputTest.php
+++ b/tests/Symfony/Tests/Components/Console/Input/ArgvInputTest.php
@@ -53,7 +53,7 @@ class ArgvInputTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\RuntimeException', $e, '->parse() throws a \RuntimeException if no parameter is passed to an option when it is required');
+ $this->assertInstanceOf('\RuntimeException', $e, '->parse() throws a \RuntimeException if no parameter is passed to an option when it is required');
$this->assertEquals('The "--foo" option requires a value.', $e->getMessage(), '->parse() throws a \RuntimeException if no parameter is passed to an option when it is required');
}
@@ -81,7 +81,7 @@ class ArgvInputTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\RuntimeException', $e, '->parse() throws a \RuntimeException if no parameter is passed to an option when it is required');
+ $this->assertInstanceOf('\RuntimeException', $e, '->parse() throws a \RuntimeException if no parameter is passed to an option when it is required');
$this->assertEquals('The "--foo" option requires a value.', $e->getMessage(), '->parse() throws a \RuntimeException if no parameter is passed to an option when it is required');
}
@@ -93,7 +93,7 @@ class ArgvInputTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\RuntimeException', $e, '->parse() throws a \RuntimeException if a value is passed to an option which does not take one');
+ $this->assertInstanceOf('\RuntimeException', $e, '->parse() throws a \RuntimeException if a value is passed to an option which does not take one');
$this->assertEquals('The "-o" option does not exist.', $e->getMessage(), '->parse() throws a \RuntimeException if a value is passed to an option which does not take one');
}
@@ -105,7 +105,7 @@ class ArgvInputTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\RuntimeException', $e, '->parse() throws a \RuntimeException if too many arguments are passed');
+ $this->assertInstanceOf('\RuntimeException', $e, '->parse() throws a \RuntimeException if too many arguments are passed');
$this->assertEquals('Too many arguments.', $e->getMessage(), '->parse() throws a \RuntimeException if too many arguments are passed');
}
@@ -117,7 +117,7 @@ class ArgvInputTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\RuntimeException', $e, '->parse() throws a \RuntimeException if an unknown long option is passed');
+ $this->assertInstanceOf('\RuntimeException', $e, '->parse() throws a \RuntimeException if an unknown long option is passed');
$this->assertEquals('The "--foo" option does not exist.', $e->getMessage(), '->parse() throws a \RuntimeException if an unknown long option is passed');
}
@@ -129,7 +129,7 @@ class ArgvInputTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\RuntimeException', $e, '->parse() throws a \RuntimeException if an unknown short option is passed');
+ $this->assertInstanceOf('\RuntimeException', $e, '->parse() throws a \RuntimeException if an unknown short option is passed');
$this->assertEquals('The "-f" option does not exist.', $e->getMessage(), '->parse() throws a \RuntimeException if an unknown short option is passed');
}
diff --git a/tests/Symfony/Tests/Components/Console/Input/ArrayInputTest.php b/tests/Symfony/Tests/Components/Console/Input/ArrayInputTest.php
index 55aaa9e7c8..0df25436a0 100644
--- a/tests/Symfony/Tests/Components/Console/Input/ArrayInputTest.php
+++ b/tests/Symfony/Tests/Components/Console/Input/ArrayInputTest.php
@@ -49,7 +49,7 @@ class ArrayInputTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->parse() throws an \InvalidArgumentException exception if an invalid argument is passed');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->parse() throws an \InvalidArgumentException exception if an invalid argument is passed');
$this->assertEquals('The "foo" argument does not exist.', $e->getMessage(), '->parse() throws an \InvalidArgumentException exception if an invalid argument is passed');
}
@@ -69,7 +69,7 @@ class ArrayInputTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->parse() throws an \InvalidArgumentException exception if a required option is passed without a value');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->parse() throws an \InvalidArgumentException exception if a required option is passed without a value');
$this->assertEquals('The "--foo" option requires a value.', $e->getMessage(), '->parse() throws an \InvalidArgumentException exception if a required option is passed without a value');
}
@@ -80,7 +80,7 @@ class ArrayInputTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->parse() throws an \InvalidArgumentException exception if an invalid option is passed');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->parse() throws an \InvalidArgumentException exception if an invalid option is passed');
$this->assertEquals('The "--foo" option does not exist.', $e->getMessage(), '->parse() throws an \InvalidArgumentException exception if an invalid option is passed');
}
@@ -94,7 +94,7 @@ class ArrayInputTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->parse() throws an \InvalidArgumentException exception if an invalid option is passed');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->parse() throws an \InvalidArgumentException exception if an invalid option is passed');
$this->assertEquals('The "-o" option does not exist.', $e->getMessage(), '->parse() throws an \InvalidArgumentException exception if an invalid option is passed');
}
}
diff --git a/tests/Symfony/Tests/Components/Console/Input/InputArgumentTest.php b/tests/Symfony/Tests/Components/Console/Input/InputArgumentTest.php
index d7dc6db055..e824a6aaee 100644
--- a/tests/Symfony/Tests/Components/Console/Input/InputArgumentTest.php
+++ b/tests/Symfony/Tests/Components/Console/Input/InputArgumentTest.php
@@ -40,7 +40,7 @@ class InputArgumentTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\Exception', $e, '__construct() throws an Exception if the mode is not valid');
+ $this->assertInstanceOf('\Exception', $e, '__construct() throws an Exception if the mode is not valid');
$this->assertEquals('Argument mode "ANOTHER_ONE" is not valid.', $e->getMessage());
}
}
@@ -87,7 +87,7 @@ class InputArgumentTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\Exception', $e, '->parse() throws an \InvalidArgumentException exception if an invalid option is passed');
+ $this->assertInstanceOf('\Exception', $e, '->parse() throws an \InvalidArgumentException exception if an invalid option is passed');
$this->assertEquals('Cannot set a default value except for Parameter::OPTIONAL mode.', $e->getMessage());
}
@@ -99,7 +99,7 @@ class InputArgumentTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\Exception', $e, '->setDefault() throws an Exception if you give a default value which is not an array for a IS_ARRAY option');
+ $this->assertInstanceOf('\Exception', $e, '->setDefault() throws an Exception if you give a default value which is not an array for a IS_ARRAY option');
$this->assertEquals('A default value for an array argument must be an array.', $e->getMessage());
}
}
diff --git a/tests/Symfony/Tests/Components/Console/Input/InputDefinitionTest.php b/tests/Symfony/Tests/Components/Console/Input/InputDefinitionTest.php
index 4a2a0d6021..31015b0481 100644
--- a/tests/Symfony/Tests/Components/Console/Input/InputDefinitionTest.php
+++ b/tests/Symfony/Tests/Components/Console/Input/InputDefinitionTest.php
@@ -86,7 +86,7 @@ class InputDefinitionTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\Exception', $e, '->addArgument() throws a Exception if another argument is already registered with the same name');
+ $this->assertInstanceOf('\Exception', $e, '->addArgument() throws a Exception if another argument is already registered with the same name');
$this->assertEquals('An argument with name "foo" already exist.', $e->getMessage());
}
@@ -99,7 +99,7 @@ class InputDefinitionTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\Exception', $e, '->addArgument() throws a Exception if there is an array parameter already registered');
+ $this->assertInstanceOf('\Exception', $e, '->addArgument() throws a Exception if there is an array parameter already registered');
$this->assertEquals('Cannot add an argument after an array argument.', $e->getMessage());
}
@@ -114,7 +114,7 @@ class InputDefinitionTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\Exception', $e, '->addArgument() throws an exception if you try to add a required argument after an optional one');
+ $this->assertInstanceOf('\Exception', $e, '->addArgument() throws an exception if you try to add a required argument after an optional one');
$this->assertEquals('Cannot add a required argument after an optional one.', $e->getMessage());
}
}
@@ -133,7 +133,7 @@ class InputDefinitionTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\Exception', $e, '->getArgument() throws an exception if the InputArgument name does not exist');
+ $this->assertInstanceOf('\Exception', $e, '->getArgument() throws an exception if the InputArgument name does not exist');
$this->assertEquals('The "bar" argument does not exist.', $e->getMessage());
}
}
@@ -201,7 +201,7 @@ class InputDefinitionTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\Exception', $e, '->setOptions() clears all InputOption objects');
+ $this->assertInstanceOf('\Exception', $e, '->setOptions() clears all InputOption objects');
$this->assertEquals('The "-f" option does not exist.', $e->getMessage());
}
}
@@ -232,7 +232,7 @@ class InputDefinitionTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\Exception', $e, '->addOption() throws a Exception if the another option is already registered with the same name');
+ $this->assertInstanceOf('\Exception', $e, '->addOption() throws a Exception if the another option is already registered with the same name');
$this->assertEquals('An option named "foo" already exist.', $e->getMessage());
}
try
@@ -242,7 +242,7 @@ class InputDefinitionTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\Exception', $e, '->addOption() throws a Exception if the another option is already registered with the same shortcut');
+ $this->assertInstanceOf('\Exception', $e, '->addOption() throws a Exception if the another option is already registered with the same shortcut');
$this->assertEquals('An option with shortcut "f" already exist.', $e->getMessage());
}
}
@@ -260,7 +260,7 @@ class InputDefinitionTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\Exception', $e, '->getOption() throws an exception if the option name does not exist');
+ $this->assertInstanceOf('\Exception', $e, '->getOption() throws an exception if the option name does not exist');
$this->assertEquals('The "--bar" option does not exist.', $e->getMessage());
}
}
@@ -296,7 +296,7 @@ class InputDefinitionTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\Exception', $e, '->getOption() throws an exception if the shortcut does not exist');
+ $this->assertInstanceOf('\Exception', $e, '->getOption() throws an exception if the shortcut does not exist');
$this->assertEquals('The "-l" option does not exist.', $e->getMessage());
}
}
diff --git a/tests/Symfony/Tests/Components/Console/Input/InputOptionTest.php b/tests/Symfony/Tests/Components/Console/Input/InputOptionTest.php
index 7f2c4b30a1..0c0ae98302 100644
--- a/tests/Symfony/Tests/Components/Console/Input/InputOptionTest.php
+++ b/tests/Symfony/Tests/Components/Console/Input/InputOptionTest.php
@@ -29,7 +29,7 @@ class InputOptionTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\Exception', $e, '->setDefault() throws an Exception if PARAMETER_IS_ARRAY option is used when an option does not accept a value');
+ $this->assertInstanceOf('\Exception', $e, '->setDefault() throws an Exception if PARAMETER_IS_ARRAY option is used when an option does not accept a value');
$this->assertEquals('Impossible to have an option mode PARAMETER_IS_ARRAY if the option does not accept a parameter.', $e->getMessage());
}
@@ -72,7 +72,7 @@ class InputOptionTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\Exception', $e, '__construct() throws an Exception if the mode is not valid');
+ $this->assertInstanceOf('\Exception', $e, '__construct() throws an Exception if the mode is not valid');
$this->assertEquals('Option mode "ANOTHER_ONE" is not valid.', $e->getMessage());
}
}
@@ -129,7 +129,7 @@ class InputOptionTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\Exception', $e, '->setDefault() throws an Exception if you give a default value for a PARAMETER_NONE option');
+ $this->assertInstanceOf('\Exception', $e, '->setDefault() throws an Exception if you give a default value for a PARAMETER_NONE option');
$this->assertEquals('Cannot set a default value when using Option::PARAMETER_NONE mode.', $e->getMessage());
}
@@ -141,7 +141,7 @@ class InputOptionTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\Exception', $e, '->setDefault() throws an Exception if you give a default value which is not an array for a PARAMETER_IS_ARRAY option');
+ $this->assertInstanceOf('\Exception', $e, '->setDefault() throws an Exception if you give a default value which is not an array for a PARAMETER_IS_ARRAY option');
$this->assertEquals('A default value for an array option must be an array.', $e->getMessage());
}
}
diff --git a/tests/Symfony/Tests/Components/Console/Input/InputTest.php b/tests/Symfony/Tests/Components/Console/Input/InputTest.php
index 3394a8a626..6a40d9b8e5 100644
--- a/tests/Symfony/Tests/Components/Console/Input/InputTest.php
+++ b/tests/Symfony/Tests/Components/Console/Input/InputTest.php
@@ -43,7 +43,7 @@ class InputTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->setOption() throws a \InvalidArgumentException if the option does not exist');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->setOption() throws a \InvalidArgumentException if the option does not exist');
$this->assertEquals('The "foo" option does not exist.', $e->getMessage());
}
@@ -54,7 +54,7 @@ class InputTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->setOption() throws a \InvalidArgumentException if the option does not exist');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->setOption() throws a \InvalidArgumentException if the option does not exist');
$this->assertEquals('The "foo" option does not exist.', $e->getMessage());
}
}
@@ -79,7 +79,7 @@ class InputTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->setOption() throws a \InvalidArgumentException if the option does not exist');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->setOption() throws a \InvalidArgumentException if the option does not exist');
$this->assertEquals('The "foo" argument does not exist.', $e->getMessage());
}
@@ -90,7 +90,7 @@ class InputTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->setOption() throws a \InvalidArgumentException if the option does not exist');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->setOption() throws a \InvalidArgumentException if the option does not exist');
$this->assertEquals('The "foo" argument does not exist.', $e->getMessage());
}
}
@@ -107,7 +107,7 @@ class InputTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\RuntimeException', $e, '->validate() throws a \RuntimeException if not enough arguments are given');
+ $this->assertInstanceOf('\RuntimeException', $e, '->validate() throws a \RuntimeException if not enough arguments are given');
$this->assertEquals('Not enough arguments.', $e->getMessage());
}
diff --git a/tests/Symfony/Tests/Components/Console/Output/OutputTest.php b/tests/Symfony/Tests/Components/Console/Output/OutputTest.php
index 9c70b25fc6..0f76eb1a4c 100644
--- a/tests/Symfony/Tests/Components/Console/Output/OutputTest.php
+++ b/tests/Symfony/Tests/Components/Console/Output/OutputTest.php
@@ -76,7 +76,7 @@ class OutputTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->writeln() throws an \InvalidArgumentException when the type does not exist');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->writeln() throws an \InvalidArgumentException when the type does not exist');
$this->assertEquals('Unknown output type given (24)', $e->getMessage());
}
@@ -87,7 +87,7 @@ class OutputTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->writeln() throws an \InvalidArgumentException when a style does not exist');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->writeln() throws an \InvalidArgumentException when a style does not exist');
$this->assertEquals('Unknown style "bar".', $e->getMessage());
}
}
diff --git a/tests/Symfony/Tests/Components/Console/Output/StreamOutputTest.php b/tests/Symfony/Tests/Components/Console/Output/StreamOutputTest.php
index 637a3a3c61..66f37adad8 100644
--- a/tests/Symfony/Tests/Components/Console/Output/StreamOutputTest.php
+++ b/tests/Symfony/Tests/Components/Console/Output/StreamOutputTest.php
@@ -31,7 +31,7 @@ class StreamOutputTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '__construct() throws an \InvalidArgumentException if the first argument is not a stream');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '__construct() throws an \InvalidArgumentException if the first argument is not a stream');
$this->assertEquals('The StreamOutput class needs a stream as its first argument.', $e->getMessage());
}
diff --git a/tests/Symfony/Tests/Components/CssSelector/ParserTest.php b/tests/Symfony/Tests/Components/CssSelector/ParserTest.php
index 7181a97846..5be80f95b4 100644
--- a/tests/Symfony/Tests/Components/CssSelector/ParserTest.php
+++ b/tests/Symfony/Tests/Components/CssSelector/ParserTest.php
@@ -45,7 +45,7 @@ class ParserTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\Symfony\Components\CssSelector\SyntaxError', $e, '->parse() throws an Exception if the css selector is not valid');
+ $this->assertInstanceOf('\Symfony\Components\CssSelector\SyntaxError', $e, '->parse() throws an Exception if the css selector is not valid');
$this->assertEquals("Expected symbol, got '' at h1: -> ", $e->getMessage(), '->parse() throws an Exception if the css selector is not valid');
}
}
diff --git a/tests/Symfony/Tests/Components/DependencyInjection/BuilderConfigurationTest.php b/tests/Symfony/Tests/Components/DependencyInjection/BuilderConfigurationTest.php
index 8bef486da3..b12001e261 100644
--- a/tests/Symfony/Tests/Components/DependencyInjection/BuilderConfigurationTest.php
+++ b/tests/Symfony/Tests/Components/DependencyInjection/BuilderConfigurationTest.php
@@ -112,7 +112,7 @@ class BuilderConfigurationTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->getParameter() throws an \InvalidArgumentException if the key does not exist');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->getParameter() throws an \InvalidArgumentException if the key does not exist');
$this->assertEquals('The parameter "baba" must be defined.', $e->getMessage(), '->getParameter() throws an \InvalidArgumentException if the key does not exist');
}
}
@@ -149,7 +149,7 @@ class BuilderConfigurationTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->getAlias() throws an \InvalidArgumentException if the alias does not exist');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->getAlias() throws an \InvalidArgumentException if the alias does not exist');
$this->assertEquals('The service alias "baba" does not exist.', $e->getMessage(), '->getAlias() throws an \InvalidArgumentException if the alias does not exist');
}
@@ -186,7 +186,7 @@ class BuilderConfigurationTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->getDefinition() throws an InvalidArgumentException if the service definition does not exist');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->getDefinition() throws an InvalidArgumentException if the service definition does not exist');
$this->assertEquals('The service definition "baz" does not exist.', $e->getMessage(), '->getDefinition() throws an InvalidArgumentException if the service definition does not exist');
}
}
diff --git a/tests/Symfony/Tests/Components/DependencyInjection/BuilderTest.php b/tests/Symfony/Tests/Components/DependencyInjection/BuilderTest.php
index 8da64cb46a..0f4118b856 100644
--- a/tests/Symfony/Tests/Components/DependencyInjection/BuilderTest.php
+++ b/tests/Symfony/Tests/Components/DependencyInjection/BuilderTest.php
@@ -50,7 +50,7 @@ class BuilderTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->getDefinition() throws an InvalidArgumentException if the service definition does not exist');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->getDefinition() throws an InvalidArgumentException if the service definition does not exist');
$this->assertEquals('The service definition "baz" does not exist.', $e->getMessage(), '->getDefinition() throws an InvalidArgumentException if the service definition does not exist');
}
}
@@ -60,7 +60,7 @@ class BuilderTest extends \PHPUnit_Framework_TestCase
$builder = new Builder();
$builder->register('foo', 'FooClass');
$this->assertTrue($builder->hasDefinition('foo'), '->register() registers a new service definition');
- $this->assertType('Symfony\Components\DependencyInjection\Definition', $builder->getDefinition('foo'), '->register() returns the newly created Definition instance');
+ $this->assertInstanceOf('Symfony\Components\DependencyInjection\Definition', $builder->getDefinition('foo'), '->register() returns the newly created Definition instance');
}
public function testHasService()
@@ -83,7 +83,7 @@ class BuilderTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->getService() throws an InvalidArgumentException if the service does not exist');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->getService() throws an InvalidArgumentException if the service does not exist');
$this->assertEquals('The service definition "foo" does not exist.', $e->getMessage(), '->getService() throws an InvalidArgumentException if the service does not exist');
}
$builder->register('foo', 'stdClass');
@@ -101,7 +101,7 @@ class BuilderTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\LogicException', $e, '->getService() throws a LogicException if the service has a circular reference to itself');
+ $this->assertInstanceOf('\LogicException', $e, '->getService() throws a LogicException if the service has a circular reference to itself');
$this->assertEquals('The service "baz" has a circular reference to itself.', $e->getMessage(), '->getService() throws a LogicException if the service has a circular reference to itself');
}
@@ -136,7 +136,7 @@ class BuilderTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->getAlias() throws an InvalidArgumentException if the alias does not exist');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->getAlias() throws an InvalidArgumentException if the alias does not exist');
$this->assertEquals('The service alias "foobar" does not exist.', $e->getMessage(), '->getAlias() throws an InvalidArgumentException if the alias does not exist');
}
}
@@ -157,10 +157,10 @@ class BuilderTest extends \PHPUnit_Framework_TestCase
{
$builder = new Builder();
$builder->register('foo1', 'FooClass')->setFile(self::$fixturesPath.'/includes/foo.php');
- $this->assertType('\FooClass', $builder->getService('foo1'), '->createService() requires the file defined by the service definition');
+ $this->assertInstanceOf('\FooClass', $builder->getService('foo1'), '->createService() requires the file defined by the service definition');
$builder->register('foo2', 'FooClass')->setFile(self::$fixturesPath.'/includes/%file%.php');
$builder->setParameter('file', 'foo');
- $this->assertType('\FooClass', $builder->getService('foo2'), '->createService() replaces parameters in the file provided by the service definition');
+ $this->assertInstanceOf('\FooClass', $builder->getService('foo2'), '->createService() replaces parameters in the file provided by the service definition');
}
public function testCreateServiceClass()
@@ -168,7 +168,7 @@ class BuilderTest extends \PHPUnit_Framework_TestCase
$builder = new Builder();
$builder->register('foo1', '%class%');
$builder->setParameter('class', 'stdClass');
- $this->assertType('\stdClass', $builder->getService('foo1'), '->createService() replaces parameters in the class provided by the service definition');
+ $this->assertInstanceOf('\stdClass', $builder->getService('foo1'), '->createService() replaces parameters in the class provided by the service definition');
}
public function testCreateServiceArguments()
@@ -223,7 +223,7 @@ class BuilderTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->createService() throws an InvalidArgumentException if the configure callable is not a valid callable');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->createService() throws an InvalidArgumentException if the configure callable is not a valid callable');
$this->assertEquals('The configure callable for class "FooClass" is not a callable.', $e->getMessage(), '->createService() throws an InvalidArgumentException if the configure callable is not a valid callable');
}
}
@@ -248,7 +248,7 @@ class BuilderTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\RuntimeException', $e, '->resolveValue() throws a RuntimeException if a placeholder references a non-existant parameter');
+ $this->assertInstanceOf('\RuntimeException', $e, '->resolveValue() throws a RuntimeException if a placeholder references a non-existant parameter');
$this->assertEquals('The parameter "foobar" must be defined.', $e->getMessage(), '->resolveValue() throws a RuntimeException if a placeholder references a non-existant parameter');
}
@@ -259,7 +259,7 @@ class BuilderTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\RuntimeException', $e, '->resolveValue() throws a RuntimeException if a placeholder references a non-existant parameter');
+ $this->assertInstanceOf('\RuntimeException', $e, '->resolveValue() throws a RuntimeException if a placeholder references a non-existant parameter');
$this->assertEquals('The parameter "foobar" must be defined (used in the following expression: "foo %foobar% bar").', $e->getMessage(), '->resolveValue() throws a RuntimeException if a placeholder references a non-existant parameter');
}
}
diff --git a/tests/Symfony/Tests/Components/DependencyInjection/ContainerTest.php b/tests/Symfony/Tests/Components/DependencyInjection/ContainerTest.php
index 7cb6bb845c..9388c8d20e 100644
--- a/tests/Symfony/Tests/Components/DependencyInjection/ContainerTest.php
+++ b/tests/Symfony/Tests/Components/DependencyInjection/ContainerTest.php
@@ -66,7 +66,7 @@ class ContainerTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->getParameter() thrown an \InvalidArgumentException if the key does not exist');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->getParameter() thrown an \InvalidArgumentException if the key does not exist');
$this->assertEquals('The parameter "baba" must be defined.', $e->getMessage(), '->getParameter() thrown an \InvalidArgumentException if the key does not exist');
}
@@ -77,7 +77,7 @@ class ContainerTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->offsetGet() thrown an \InvalidArgumentException if the key does not exist');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->offsetGet() thrown an \InvalidArgumentException if the key does not exist');
$this->assertEquals('The parameter "baba" must be defined.', $e->getMessage(), '->offsetGet() thrown an \InvalidArgumentException if the key does not exist');
}
}
@@ -139,7 +139,7 @@ class ContainerTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->getService() thrown an \InvalidArgumentException if the service does not exist');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->getService() thrown an \InvalidArgumentException if the service does not exist');
$this->assertEquals('The service "baba" does not exist.', $e->getMessage(), '->getService() thrown an \InvalidArgumentException if the service does not exist');
}
@@ -150,7 +150,7 @@ class ContainerTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->__get() thrown an \InvalidArgumentException if the service does not exist');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->__get() thrown an \InvalidArgumentException if the service does not exist');
$this->assertEquals('The service "baba" does not exist.', $e->getMessage(), '->__get() thrown an \InvalidArgumentException if the service does not exist');
}
@@ -161,7 +161,7 @@ class ContainerTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\LogicException', $e, '->__unset() thrown an LogicException if you try to remove a service');
+ $this->assertInstanceOf('\LogicException', $e, '->__unset() thrown an LogicException if you try to remove a service');
$this->assertEquals('You can\'t unset a service.', $e->getMessage(), '->__unset() thrown an LogicException if you try to remove a service');
}
@@ -182,7 +182,7 @@ class ContainerTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\BadMethodCallException', $e, '__call() throws a \BadMethodCallException exception if the method is not a service method');
+ $this->assertInstanceOf('\BadMethodCallException', $e, '__call() throws a \BadMethodCallException exception if the method is not a service method');
$this->assertEquals('Call to undefined method Symfony\Components\DependencyInjection\Container::getFooBar_Foo.', $e->getMessage(), '__call() throws a \BadMethodCallException exception if the method is not a service method');
}
}
@@ -198,7 +198,7 @@ class ContainerTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->getService() throws a \InvalidArgumentException exception if the service is empty');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->getService() throws a \InvalidArgumentException exception if the service is empty');
$this->assertEquals('The service "" does not exist.', $e->getMessage(), '->getService() throws a \InvalidArgumentException exception if the service is empty');
}
}
diff --git a/tests/Symfony/Tests/Components/DependencyInjection/Dumper/DumperTest.php b/tests/Symfony/Tests/Components/DependencyInjection/Dumper/DumperTest.php
index 367776eebb..6e727fe5be 100644
--- a/tests/Symfony/Tests/Components/DependencyInjection/Dumper/DumperTest.php
+++ b/tests/Symfony/Tests/Components/DependencyInjection/Dumper/DumperTest.php
@@ -26,7 +26,7 @@ class DumperTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\LogicException', $e, '->dump() returns a LogicException if the dump() method has not been overriden by a children class');
+ $this->assertInstanceOf('\LogicException', $e, '->dump() returns a LogicException if the dump() method has not been overriden by a children class');
$this->assertEquals('You must extend this abstract class and implement the dump() method.', $e->getMessage(), '->dump() returns a LogicException if the dump() method has not been overriden by a children class');
}
}
diff --git a/tests/Symfony/Tests/Components/DependencyInjection/Dumper/PhpDumperTest.php b/tests/Symfony/Tests/Components/DependencyInjection/Dumper/PhpDumperTest.php
index 0fd8e53549..762053dbde 100644
--- a/tests/Symfony/Tests/Components/DependencyInjection/Dumper/PhpDumperTest.php
+++ b/tests/Symfony/Tests/Components/DependencyInjection/Dumper/PhpDumperTest.php
@@ -55,7 +55,7 @@ class PhpDumperTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\RuntimeException', $e, '->dump() returns a LogicException if the dump() method has not been overriden by a children class');
+ $this->assertInstanceOf('\RuntimeException', $e, '->dump() returns a LogicException if the dump() method has not been overriden by a children class');
$this->assertEquals('Unable to dump a service container if a parameter is an object or a resource.', $e->getMessage(), '->dump() returns a LogicException if the dump() method has not been overriden by a children class');
}
}
diff --git a/tests/Symfony/Tests/Components/DependencyInjection/Dumper/XmlDumperTest.php b/tests/Symfony/Tests/Components/DependencyInjection/Dumper/XmlDumperTest.php
index dd49d4d85c..75d85ebb41 100644
--- a/tests/Symfony/Tests/Components/DependencyInjection/Dumper/XmlDumperTest.php
+++ b/tests/Symfony/Tests/Components/DependencyInjection/Dumper/XmlDumperTest.php
@@ -54,7 +54,7 @@ class XmlDumperTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\RuntimeException', $e, '->dump() throws a RuntimeException if the container to be dumped has reference to objects or resources');
+ $this->assertInstanceOf('\RuntimeException', $e, '->dump() throws a RuntimeException if the container to be dumped has reference to objects or resources');
$this->assertEquals('Unable to dump a service container if a parameter is an object or a resource.', $e->getMessage(), '->dump() throws a RuntimeException if the container to be dumped has reference to objects or resources');
}
}
diff --git a/tests/Symfony/Tests/Components/DependencyInjection/Dumper/YamlDumperTest.php b/tests/Symfony/Tests/Components/DependencyInjection/Dumper/YamlDumperTest.php
index f1fb331e90..0ef145ea6c 100644
--- a/tests/Symfony/Tests/Components/DependencyInjection/Dumper/YamlDumperTest.php
+++ b/tests/Symfony/Tests/Components/DependencyInjection/Dumper/YamlDumperTest.php
@@ -54,7 +54,7 @@ class YamlDumperTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\RuntimeException', $e, '->dump() throws a RuntimeException if the container to be dumped has reference to objects or resources');
+ $this->assertInstanceOf('\RuntimeException', $e, '->dump() throws a RuntimeException if the container to be dumped has reference to objects or resources');
$this->assertEquals('Unable to dump a service container if a parameter is an object or a resource.', $e->getMessage(), '->dump() throws a RuntimeException if the container to be dumped has reference to objects or resources');
}
}
diff --git a/tests/Symfony/Tests/Components/DependencyInjection/Loader/IniFileLoaderTest.php b/tests/Symfony/Tests/Components/DependencyInjection/Loader/IniFileLoaderTest.php
index 2c18b49025..8dc0908399 100644
--- a/tests/Symfony/Tests/Components/DependencyInjection/Loader/IniFileLoaderTest.php
+++ b/tests/Symfony/Tests/Components/DependencyInjection/Loader/IniFileLoaderTest.php
@@ -35,7 +35,7 @@ class IniLoaderTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the loaded file does not exist');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the loaded file does not exist');
$this->assertStringStartsWith('The file "foo.ini" does not exist (in: ', $e->getMessage(), '->load() throws an InvalidArgumentException if the loaded file does not exist');
}
@@ -46,7 +46,7 @@ class IniLoaderTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the loaded file is not parseable');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the loaded file is not parseable');
$this->assertEquals('The nonvalid.ini file is not valid.', $e->getMessage(), '->load() throws an InvalidArgumentException if the loaded file is not parseable');
}
}
diff --git a/tests/Symfony/Tests/Components/DependencyInjection/Loader/LoaderExtensionTest.php b/tests/Symfony/Tests/Components/DependencyInjection/Loader/LoaderExtensionTest.php
index 08dbf8177b..ef227ca276 100644
--- a/tests/Symfony/Tests/Components/DependencyInjection/Loader/LoaderExtensionTest.php
+++ b/tests/Symfony/Tests/Components/DependencyInjection/Loader/LoaderExtensionTest.php
@@ -25,7 +25,7 @@ class LoaderExtensionTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the tag does not exist');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the tag does not exist');
$this->assertEquals('The tag "foo" is not defined in the "http://www.example.com/schema/project" extension.', $e->getMessage(), '->load() throws an InvalidArgumentException if the tag does not exist');
}
diff --git a/tests/Symfony/Tests/Components/DependencyInjection/Loader/XmlFileLoaderTest.php b/tests/Symfony/Tests/Components/DependencyInjection/Loader/XmlFileLoaderTest.php
index a7386695f0..635cd078bd 100644
--- a/tests/Symfony/Tests/Components/DependencyInjection/Loader/XmlFileLoaderTest.php
+++ b/tests/Symfony/Tests/Components/DependencyInjection/Loader/XmlFileLoaderTest.php
@@ -37,7 +37,7 @@ class XmlFileLoaderTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the loaded file does not exist');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the loaded file does not exist');
$this->assertStringStartsWith('The file "foo.xml" does not exist (in:', $e->getMessage(), '->load() throws an InvalidArgumentException if the loaded file does not exist');
}
}
@@ -53,7 +53,7 @@ class XmlFileLoaderTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->parseFile() throws an InvalidArgumentException if the loaded file is not a valid XML file');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->parseFile() throws an InvalidArgumentException if the loaded file is not a valid XML file');
$this->assertStringStartsWith('[ERROR 4] Start tag expected, \'<\' not found (in', $e->getMessage(), '->parseFile() throws an InvalidArgumentException if the loaded file is not a valid XML file');
}
@@ -66,7 +66,7 @@ class XmlFileLoaderTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->parseFile() throws an InvalidArgumentException if the loaded file does not validate the XSD');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->parseFile() throws an InvalidArgumentException if the loaded file does not validate the XSD');
$this->assertStringStartsWith('[ERROR 1845] Element \'nonvalid\': No matching global declaration available for the validation root. (in', $e->getMessage(), '->parseFile() throws an InvalidArgumentException if the loaded file does not validate the XSD');
}
@@ -185,7 +185,7 @@ class XmlFileLoaderTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the tag is not valid');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the tag is not valid');
$this->assertStringStartsWith('There is no extension able to load the configuration for "foobar:foobar" (in', $e->getMessage(), '->load() throws an InvalidArgumentException if the tag is not valid');
}
@@ -196,7 +196,7 @@ class XmlFileLoaderTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if an extension is not loaded');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if an extension is not loaded');
$this->assertStringStartsWith('The "foobar" tag is not valid (in', $e->getMessage(), '->load() throws an InvalidArgumentException if an extension is not loaded');
}
}
diff --git a/tests/Symfony/Tests/Components/DependencyInjection/Loader/YamlFileLoaderTest.php b/tests/Symfony/Tests/Components/DependencyInjection/Loader/YamlFileLoaderTest.php
index c90683af94..c61b87e4ae 100644
--- a/tests/Symfony/Tests/Components/DependencyInjection/Loader/YamlFileLoaderTest.php
+++ b/tests/Symfony/Tests/Components/DependencyInjection/Loader/YamlFileLoaderTest.php
@@ -37,7 +37,7 @@ class YamlFileLoaderTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the loaded file does not exist');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the loaded file does not exist');
$this->assertEquals('The service file "foo.yml" is not valid.', $e->getMessage(), '->load() throws an InvalidArgumentException if the loaded file does not exist');
}
@@ -48,7 +48,7 @@ class YamlFileLoaderTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the loaded file is not a valid YAML file');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the loaded file is not a valid YAML file');
$this->assertEquals('The service file "parameters.ini" is not valid.', $e->getMessage(), '->load() throws an InvalidArgumentException if the loaded file is not a valid YAML file');
}
@@ -63,7 +63,7 @@ class YamlFileLoaderTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the loaded file does not validate');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the loaded file does not validate');
$this->assertStringMatchesFormat('The service file "nonvalid%d.yml" is not valid.', $e->getMessage(), '->load() throws an InvalidArgumentException if the loaded file does not validate');
}
}
@@ -127,7 +127,7 @@ class YamlFileLoaderTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the tag is not valid');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the tag is not valid');
$this->assertStringStartsWith('There is no extension able to load the configuration for "foobar.foobar" (in', $e->getMessage(), '->load() throws an InvalidArgumentException if the tag is not valid');
}
@@ -138,7 +138,7 @@ class YamlFileLoaderTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if an extension is not loaded');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if an extension is not loaded');
$this->assertStringStartsWith('The "foobar" tag is not valid (in', $e->getMessage(), '->load() throws an InvalidArgumentException if an extension is not loaded');
}
}
diff --git a/tests/Symfony/Tests/Components/DomCrawler/LinkTest.php b/tests/Symfony/Tests/Components/DomCrawler/LinkTest.php
index 98dec10367..4992680ef9 100644
--- a/tests/Symfony/Tests/Components/DomCrawler/LinkTest.php
+++ b/tests/Symfony/Tests/Components/DomCrawler/LinkTest.php
@@ -29,7 +29,7 @@ class LinkTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\LogicException', $e, '__construct() throws a \LogicException if the node is not an "a" tag');
+ $this->assertInstanceOf('\LogicException', $e, '__construct() throws a \LogicException if the node is not an "a" tag');
}
}
diff --git a/tests/Symfony/Tests/Components/EventDispatcher/EventTest.php b/tests/Symfony/Tests/Components/EventDispatcher/EventTest.php
index 944cb06da6..35406d0571 100644
--- a/tests/Symfony/Tests/Components/EventDispatcher/EventTest.php
+++ b/tests/Symfony/Tests/Components/EventDispatcher/EventTest.php
@@ -47,7 +47,7 @@ class EventTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->getParameter() throws an \InvalidArgumentException exception when the parameter does not exist');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->getParameter() throws an \InvalidArgumentException exception when the parameter does not exist');
$this->assertEquals('The event "name" has no "foobar" parameter.', $e->getMessage(), '->getParameter() throws an \InvalidArgumentException exception when the parameter does not exist');
}
$event = new Event($this->subject, 'name', $this->parameters);
@@ -84,7 +84,7 @@ class EventTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '::offsetGet() throws an \InvalidArgumentException exception when the parameter does not exist');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '::offsetGet() throws an \InvalidArgumentException exception when the parameter does not exist');
$this->assertEquals('The event "name" has no "foobar" parameter.', $e->getMessage(), '::offsetGet() throws an \InvalidArgumentException exception when the parameter does not exist');
}
diff --git a/tests/Symfony/Tests/Components/OutputEscaper/ArrayDecoratorTest.php b/tests/Symfony/Tests/Components/OutputEscaper/ArrayDecoratorTest.php
index 6a9a765ef6..b70f2fca17 100644
--- a/tests/Symfony/Tests/Components/OutputEscaper/ArrayDecoratorTest.php
+++ b/tests/Symfony/Tests/Components/OutputEscaper/ArrayDecoratorTest.php
@@ -45,7 +45,7 @@ class ArrayDecoratorTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\LogicException', $e, 'The escaped object is read only (unset)');
+ $this->assertInstanceOf('\LogicException', $e, 'The escaped object is read only (unset)');
$this->assertEquals('Cannot unset values.', $e->getMessage(), 'The escaped object is read only (unset)');
}
@@ -57,7 +57,7 @@ class ArrayDecoratorTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\LogicException', $e, 'The escaped object is read only (set)');
+ $this->assertInstanceOf('\LogicException', $e, 'The escaped object is read only (set)');
$this->assertEquals('Cannot set values.', $e->getMessage(), 'The escaped object is read only (set)');
}
}
diff --git a/tests/Symfony/Tests/Components/OutputEscaper/EscaperTest.php b/tests/Symfony/Tests/Components/OutputEscaper/EscaperTest.php
index 0a853e5e95..59cddbd7b9 100644
--- a/tests/Symfony/Tests/Components/OutputEscaper/EscaperTest.php
+++ b/tests/Symfony/Tests/Components/OutputEscaper/EscaperTest.php
@@ -44,7 +44,7 @@ class EscaperTest extends \PHPUnit_Framework_TestCase
'bar' => array('foo' => 'escaped!'),
);
$output = Escaper::escape('entities', $input);
- $this->assertType('Symfony\Components\OutputEscaper\ArrayDecorator', $output, '::escape() returns a ArrayDecorator object if the value to escape is an array');
+ $this->assertInstanceOf('Symfony\Components\OutputEscaper\ArrayDecorator', $output, '::escape() returns a ArrayDecorator object if the value to escape is an array');
$this->assertEquals('<strong>escaped!</strong>', $output['foo'], '::escape() escapes all elements of the original array');
$this->assertEquals('<strong>escaped!</strong>', $output['bar']['foo'], '::escape() is recursive');
$this->assertEquals($input, $output->getRawValue(), '->getRawValue() returns the unescaped value');
@@ -54,23 +54,23 @@ class EscaperTest extends \PHPUnit_Framework_TestCase
{
$input = new OutputEscaperTestClass();
$output = Escaper::escape('entities', $input);
- $this->assertType('Symfony\Components\OutputEscaper\ObjectDecorator', $output, '::escape() returns a ObjectDecorator object if the value to escape is an object');
+ $this->assertInstanceOf('Symfony\Components\OutputEscaper\ObjectDecorator', $output, '::escape() returns a ObjectDecorator object if the value to escape is an object');
$this->assertEquals('<strong>escaped!</strong>', $output->getTitle(), '::escape() escapes all methods of the original object');
$this->assertEquals('<strong>escaped!</strong>', $output->title, '::escape() escapes all properties of the original object');
$this->assertEquals('<strong>escaped!</strong>', $output->getTitleTitle(), '::escape() is recursive');
$this->assertEquals($input, $output->getRawValue(), '->getRawValue() returns the unescaped value');
$this->assertEquals('<strong>escaped!</strong>', Escaper::escape('entities', $output)->getTitle(), '::escape() does not double escape an object');
- $this->assertType('Symfony\Components\OutputEscaper\IteratorDecorator', Escaper::escape('entities', new \DirectoryIterator('.')), '::escape() returns a IteratorDecorator object if the value to escape is an object that implements the ArrayAccess interface');
+ $this->assertInstanceOf('Symfony\Components\OutputEscaper\IteratorDecorator', Escaper::escape('entities', new \DirectoryIterator('.')), '::escape() returns a IteratorDecorator object if the value to escape is an object that implements the ArrayAccess interface');
}
public function testEscapeDoesNotEscapeObjectMarkedAsBeingSafe()
{
- $this->assertType('Symfony\Tests\Components\OutputEscaper\OutputEscaperTestClass', Escaper::escape('entities', new SafeDecorator(new OutputEscaperTestClass())), '::escape() returns the original value if it is marked as being safe');
+ $this->assertInstanceOf('Symfony\Tests\Components\OutputEscaper\OutputEscaperTestClass', Escaper::escape('entities', new SafeDecorator(new OutputEscaperTestClass())), '::escape() returns the original value if it is marked as being safe');
Escaper::markClassAsSafe('Symfony\Tests\Components\OutputEscaper\OutputEscaperTestClass');
- $this->assertType('Symfony\Tests\Components\OutputEscaper\OutputEscaperTestClass', Escaper::escape('entities', new OutputEscaperTestClass()), '::escape() returns the original value if the object class is marked as being safe');
- $this->assertType('Symfony\Tests\Components\OutputEscaper\OutputEscaperTestClass', Escaper::escape('entities', new OutputEscaperTestClassChild()), '::escape() returns the original value if one of the object parent class is marked as being safe');
+ $this->assertInstanceOf('Symfony\Tests\Components\OutputEscaper\OutputEscaperTestClass', Escaper::escape('entities', new OutputEscaperTestClass()), '::escape() returns the original value if the object class is marked as being safe');
+ $this->assertInstanceOf('Symfony\Tests\Components\OutputEscaper\OutputEscaperTestClass', Escaper::escape('entities', new OutputEscaperTestClassChild()), '::escape() returns the original value if one of the object parent class is marked as being safe');
}
public function testEscapeCannotEscapeResources()
@@ -118,21 +118,21 @@ class EscaperTest extends \PHPUnit_Framework_TestCase
$object = new OutputEscaperTestClass();
$input = Escaper::escape('entities', $object);
$output = Escaper::unescape($input);
- $this->assertType('Symfony\Tests\Components\OutputEscaper\OutputEscaperTestClass', $output, '::unescape() returns the original object when a ObjectDecorator object is passed');
+ $this->assertInstanceOf('Symfony\Tests\Components\OutputEscaper\OutputEscaperTestClass', $output, '::unescape() returns the original object when a ObjectDecorator object is passed');
$this->assertEquals('escaped!', $output->getTitle(), '::unescape() unescapes all methods of the original object');
$this->assertEquals('escaped!', $output->title, '::unescape() unescapes all properties of the original object');
$this->assertEquals('escaped!', $output->getTitleTitle(), '::unescape() is recursive');
- $this->assertType('\DirectoryIterator', IteratorDecorator::unescape(Escaper::escape('entities', new \DirectoryIterator('.'))), '::unescape() unescapes IteratorDecorator objects');
+ $this->assertInstanceOf('\DirectoryIterator', IteratorDecorator::unescape(Escaper::escape('entities', new \DirectoryIterator('.'))), '::unescape() unescapes IteratorDecorator objects');
}
public function testUnescapeDoesNotUnescapeObjectMarkedAsBeingSafe()
{
- $this->assertType('Symfony\Tests\Components\OutputEscaper\OutputEscaperTestClass', Escaper::unescape(Escaper::escape('entities', new SafeDecorator(new OutputEscaperTestClass()))), '::unescape() returns the original value if it is marked as being safe');
+ $this->assertInstanceOf('Symfony\Tests\Components\OutputEscaper\OutputEscaperTestClass', Escaper::unescape(Escaper::escape('entities', new SafeDecorator(new OutputEscaperTestClass()))), '::unescape() returns the original value if it is marked as being safe');
Escaper::markClassAsSafe('OutputEscaperTestClass');
- $this->assertType('Symfony\Tests\Components\OutputEscaper\OutputEscaperTestClass', Escaper::unescape(Escaper::escape('entities', new OutputEscaperTestClass())), '::unescape() returns the original value if the object class is marked as being safe');
- $this->assertType('Symfony\Tests\Components\OutputEscaper\OutputEscaperTestClass', Escaper::unescape(Escaper::escape('entities', new OutputEscaperTestClassChild())), '::unescape() returns the original value if one of the object parent class is marked as being safe');
+ $this->assertInstanceOf('Symfony\Tests\Components\OutputEscaper\OutputEscaperTestClass', Escaper::unescape(Escaper::escape('entities', new OutputEscaperTestClass())), '::unescape() returns the original value if the object class is marked as being safe');
+ $this->assertInstanceOf('Symfony\Tests\Components\OutputEscaper\OutputEscaperTestClass', Escaper::unescape(Escaper::escape('entities', new OutputEscaperTestClassChild())), '::unescape() returns the original value if one of the object parent class is marked as being safe');
}
public function testUnescapeDoesNothingToResources()
diff --git a/tests/Symfony/Tests/Components/Templating/EngineTest.php b/tests/Symfony/Tests/Components/Templating/EngineTest.php
index 500adb15f5..7ac073b0d1 100644
--- a/tests/Symfony/Tests/Components/Templating/EngineTest.php
+++ b/tests/Symfony/Tests/Components/Templating/EngineTest.php
@@ -59,7 +59,7 @@ class EngineTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->__get() throws an InvalidArgumentException if the helper is not defined');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->__get() throws an InvalidArgumentException if the helper is not defined');
$this->assertEquals('The helper "bar" is not defined.', $e->getMessage(), '->__get() throws an InvalidArgumentException if the helper is not defined');
}
}
@@ -81,7 +81,7 @@ class EngineTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->get() throws an InvalidArgumentException if the helper is not defined');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->get() throws an InvalidArgumentException if the helper is not defined');
$this->assertEquals('The helper "foobar" is not defined.', $e->getMessage(), '->get() throws an InvalidArgumentException if the helper is not defined');
}
@@ -99,7 +99,7 @@ class EngineTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->render() throws an InvalidArgumentException if the template does not exist');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->render() throws an InvalidArgumentException if the template does not exist');
$this->assertEquals('The template "name" does not exist (renderer: php).', $e->getMessage(), '->render() throws an InvalidArgumentException if the template does not exist');
}
@@ -111,7 +111,7 @@ class EngineTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\InvalidArgumentException', $e, '->render() throws an InvalidArgumentException if no renderer is registered for the given renderer');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->render() throws an InvalidArgumentException if no renderer is registered for the given renderer');
$this->assertEquals('The template "foo" does not exist (renderer: name).', $e->getMessage(), '->render() throws an InvalidArgumentException if no renderer is registered for the given renderer');
}
diff --git a/tests/Symfony/Tests/Components/Templating/Helper/SlotsHelperTest.php b/tests/Symfony/Tests/Components/Templating/Helper/SlotsHelperTest.php
index 5d69cbe175..c99639feef 100644
--- a/tests/Symfony/Tests/Components/Templating/Helper/SlotsHelperTest.php
+++ b/tests/Symfony/Tests/Components/Templating/Helper/SlotsHelperTest.php
@@ -68,7 +68,7 @@ class SlotsHelperTest extends \PHPUnit_Framework_TestCase
catch (\Exception $e)
{
$helper->stop();
- $this->assertType('\InvalidArgumentException', $e, '->start() throws an InvalidArgumentException if a slot with the same name is already started');
+ $this->assertInstanceOf('\InvalidArgumentException', $e, '->start() throws an InvalidArgumentException if a slot with the same name is already started');
$this->assertEquals('A slot named "bar" is already started.', $e->getMessage(), '->start() throws an InvalidArgumentException if a slot with the same name is already started');
}
@@ -79,7 +79,7 @@ class SlotsHelperTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\LogicException', $e, '->stop() throws an LogicException if no slot is started');
+ $this->assertInstanceOf('\LogicException', $e, '->stop() throws an LogicException if no slot is started');
$this->assertEquals('No slot started.', $e->getMessage(), '->stop() throws an LogicException if no slot is started');
}
}
diff --git a/tests/Symfony/Tests/Components/Templating/Loader/ChainLoaderTest.php b/tests/Symfony/Tests/Components/Templating/Loader/ChainLoaderTest.php
index 5a872c577a..0717cf4b40 100644
--- a/tests/Symfony/Tests/Components/Templating/Loader/ChainLoaderTest.php
+++ b/tests/Symfony/Tests/Components/Templating/Loader/ChainLoaderTest.php
@@ -46,7 +46,7 @@ class ChainLoaderTest extends \PHPUnit_Framework_TestCase
$loader = new ProjectTemplateLoader1(array(self::$loader1, self::$loader2));
$this->assertFalse($loader->load('bar'), '->load() returns false if the template is not found');
$this->assertFalse($loader->load('foo', array('renderer' => 'xml')), '->load() returns false if the template does not exists for the given renderer');
- $this->assertType('Symfony\Components\Templating\Storage\FileStorage', $loader->load('foo'), '->load() returns a FileStorage if the template exists');
+ $this->assertInstanceOf('Symfony\Components\Templating\Storage\FileStorage', $loader->load('foo'), '->load() returns a FileStorage if the template exists');
}
}
diff --git a/tests/Symfony/Tests/Components/Templating/Loader/FilesystemLoaderTest.php b/tests/Symfony/Tests/Components/Templating/Loader/FilesystemLoaderTest.php
index 384da9c759..db35c50d87 100644
--- a/tests/Symfony/Tests/Components/Templating/Loader/FilesystemLoaderTest.php
+++ b/tests/Symfony/Tests/Components/Templating/Loader/FilesystemLoaderTest.php
@@ -49,13 +49,13 @@ class FilesystemLoaderTest extends \PHPUnit_Framework_TestCase
$path = self::$fixturesPath.'/templates';
$loader = new ProjectTemplateLoader2($pathPattern);
$storage = $loader->load($path.'/foo.php');
- $this->assertType('Symfony\Components\Templating\Storage\FileStorage', $storage, '->load() returns a FileStorage if you pass an absolute path');
+ $this->assertInstanceOf('Symfony\Components\Templating\Storage\FileStorage', $storage, '->load() returns a FileStorage if you pass an absolute path');
$this->assertEquals($path.'/foo.php', (string) $storage, '->load() returns a FileStorage pointing to the passed absolute path');
$this->assertFalse($loader->load('bar'), '->load() returns false if the template is not found');
$storage = $loader->load('foo');
- $this->assertType('Symfony\Components\Templating\Storage\FileStorage', $storage, '->load() returns a FileStorage if you pass a relative template that exists');
+ $this->assertInstanceOf('Symfony\Components\Templating\Storage\FileStorage', $storage, '->load() returns a FileStorage if you pass a relative template that exists');
$this->assertEquals($path.'/foo.php', (string) $storage, '->load() returns a FileStorage pointing to the absolute path of the template');
$loader = new ProjectTemplateLoader2($pathPattern);
diff --git a/tests/Symfony/Tests/Components/Templating/Storage/FileStorageTest.php b/tests/Symfony/Tests/Components/Templating/Storage/FileStorageTest.php
index 515fedb341..0db8a7183c 100644
--- a/tests/Symfony/Tests/Components/Templating/Storage/FileStorageTest.php
+++ b/tests/Symfony/Tests/Components/Templating/Storage/FileStorageTest.php
@@ -19,7 +19,7 @@ class FileStorageTest extends \PHPUnit_Framework_TestCase
public function testGetContent()
{
$storage = new FileStorage('foo');
- $this->assertType('Symfony\Components\Templating\Storage\Storage', $storage, 'FileStorage is an instance of Storage');
+ $this->assertInstanceOf('Symfony\Components\Templating\Storage\Storage', $storage, 'FileStorage is an instance of Storage');
$storage = new FileStorage(__DIR__.'/../../../../../fixtures/Symfony/Components/Templating/templates/foo.php');
$this->assertEquals('', $storage->getContent(), '->getContent() returns the content of the template');
}
diff --git a/tests/Symfony/Tests/Components/Templating/Storage/StringStorageTest.php b/tests/Symfony/Tests/Components/Templating/Storage/StringStorageTest.php
index 96e1a4d8b9..e559dc263a 100644
--- a/tests/Symfony/Tests/Components/Templating/Storage/StringStorageTest.php
+++ b/tests/Symfony/Tests/Components/Templating/Storage/StringStorageTest.php
@@ -19,7 +19,7 @@ class StringStorageTest extends \PHPUnit_Framework_TestCase
public function testGetContent()
{
$storage = new StringStorage('foo');
- $this->assertType('Symfony\Components\Templating\Storage\Storage', $storage, 'StringStorage is an instance of Storage');
+ $this->assertInstanceOf('Symfony\Components\Templating\Storage\Storage', $storage, 'StringStorage is an instance of Storage');
$storage = new StringStorage('foo');
$this->assertEquals('foo', $storage->getContent(), '->getContent() returns the content of the template');
}
diff --git a/tests/Symfony/Tests/Components/Yaml/ParserTest.php b/tests/Symfony/Tests/Components/Yaml/ParserTest.php
index 3fbb1880be..cd4659f0c3 100644
--- a/tests/Symfony/Tests/Components/Yaml/ParserTest.php
+++ b/tests/Symfony/Tests/Components/Yaml/ParserTest.php
@@ -80,7 +80,7 @@ class ParserTest extends \PHPUnit_Framework_TestCase
}
catch (\Exception $e)
{
- $this->assertType('\Exception', $e, 'YAML files must not contain tabs');
+ $this->assertInstanceOf('\Exception', $e, 'YAML files must not contain tabs');
$this->assertEquals('A YAML file cannot contain tabs as indentation at line 2 ('.strpbrk($yaml, "\t").').', $e->getMessage(), 'YAML files must not contain tabs');
}
}