From b074a7156aba32ef97c1e228ab7742b351ccee42 Mon Sep 17 00:00:00 2001 From: Roland Franssen Date: Thu, 22 Sep 2016 17:52:33 +0000 Subject: [PATCH] Fixed expectedException annotations --- .../Tests/Controller/ControllerNameParserTest.php | 4 ++-- src/Symfony/Component/Asset/Tests/UrlPackageTest.php | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerNameParserTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerNameParserTest.php index 0fe47b0908..894e7ae328 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerNameParserTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerNameParserTest.php @@ -93,7 +93,7 @@ class ControllerNameParserTest extends TestCase try { $parser->parse($name); - $this->fail('->parse() throws a \InvalidArgumentException if the string is in the valid format, but not matching class can be found'); + $this->fail('->parse() throws a \InvalidArgumentException if the class is found but does not exist'); } catch (\Exception $e) { $this->assertInstanceOf('\InvalidArgumentException', $e, '->parse() throws a \InvalidArgumentException if the class is found but does not exist'); } @@ -108,7 +108,6 @@ class ControllerNameParserTest extends TestCase } /** - * @expectedException * @dataProvider getInvalidBundleNameTests */ public function testInvalidBundleName($bundleName, $suggestedBundleName) @@ -117,6 +116,7 @@ class ControllerNameParserTest extends TestCase try { $parser->parse($bundleName); + $this->fail('->parse() throws a \InvalidArgumentException if the bundle does not exist'); } catch (\Exception $e) { $this->assertInstanceOf('\InvalidArgumentException', $e, '->parse() throws a \InvalidArgumentException if the bundle does not exist'); diff --git a/src/Symfony/Component/Asset/Tests/UrlPackageTest.php b/src/Symfony/Component/Asset/Tests/UrlPackageTest.php index 515bd926ea..327876aeaf 100644 --- a/src/Symfony/Component/Asset/Tests/UrlPackageTest.php +++ b/src/Symfony/Component/Asset/Tests/UrlPackageTest.php @@ -14,8 +14,6 @@ namespace Symfony\Component\Asset\Tests; use Symfony\Component\Asset\UrlPackage; use Symfony\Component\Asset\VersionStrategy\StaticVersionStrategy; use Symfony\Component\Asset\VersionStrategy\EmptyVersionStrategy; -use Symfony\Component\Asset\Exception\InvalidArgumentException; -use Symfony\Component\Asset\Exception\LogicException; class UrlPackageTest extends \PHPUnit_Framework_TestCase { @@ -79,7 +77,7 @@ class UrlPackageTest extends \PHPUnit_Framework_TestCase } /** - * @expectedException LogicException + * @expectedException \Symfony\Component\Asset\Exception\LogicException */ public function testNoBaseUrls() { @@ -87,7 +85,7 @@ class UrlPackageTest extends \PHPUnit_Framework_TestCase } /** - * @expectedException InvalidArgumentException + * @expectedException \Symfony\Component\Asset\Exception\InvalidArgumentException */ public function testWrongBaseUrl() {