Skip to content

Commit b074a71

Browse files
ro0NLfabpot
authored andcommitted
Fixed expectedException annotations
1 parent fc0fe87 commit b074a71

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerNameParserTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public function testMissingControllers($name)
9393

9494
try {
9595
$parser->parse($name);
96-
$this->fail('->parse() throws a \InvalidArgumentException if the string is in the valid format, but not matching class can be found');
96+
$this->fail('->parse() throws a \InvalidArgumentException if the class is found but does not exist');
9797
} catch (\Exception $e) {
9898
$this->assertInstanceOf('\InvalidArgumentException', $e, '->parse() throws a \InvalidArgumentException if the class is found but does not exist');
9999
}
@@ -108,7 +108,6 @@ public function getMissingControllersTest()
108108
}
109109

110110
/**
111-
* @expectedException
112111
* @dataProvider getInvalidBundleNameTests
113112
*/
114113
public function testInvalidBundleName($bundleName, $suggestedBundleName)
@@ -117,6 +116,7 @@ public function testInvalidBundleName($bundleName, $suggestedBundleName)
117116

118117
try {
119118
$parser->parse($bundleName);
119+
$this->fail('->parse() throws a \InvalidArgumentException if the bundle does not exist');
120120
} catch (\Exception $e) {
121121
$this->assertInstanceOf('\InvalidArgumentException', $e, '->parse() throws a \InvalidArgumentException if the bundle does not exist');
122122

src/Symfony/Component/Asset/Tests/UrlPackageTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
use Symfony\Component\Asset\UrlPackage;
1515
use Symfony\Component\Asset\VersionStrategy\StaticVersionStrategy;
1616
use Symfony\Component\Asset\VersionStrategy\EmptyVersionStrategy;
17-
use Symfony\Component\Asset\Exception\InvalidArgumentException;
18-
use Symfony\Component\Asset\Exception\LogicException;
1917

2018
class UrlPackageTest extends \PHPUnit_Framework_TestCase
2119
{
@@ -79,15 +77,15 @@ public function getContextConfigs()
7977
}
8078

8179
/**
82-
* @expectedException LogicException
80+
* @expectedException \Symfony\Component\Asset\Exception\LogicException
8381
*/
8482
public function testNoBaseUrls()
8583
{
8684
new UrlPackage(array(), new EmptyVersionStrategy());
8785
}
8886

8987
/**
90-
* @expectedException InvalidArgumentException
88+
* @expectedException \Symfony\Component\Asset\Exception\InvalidArgumentException
9189
*/
9290
public function testWrongBaseUrl()
9391
{

0 commit comments

Comments
 (0)