8000 merged branch bschussek/exceptionfix (PR #6582) · Ninir/symfony@47b3f86 · GitHub
[go: up one dir, main page]

Skip to content

Commit 47b3f86

Browse files
committed
merged branch bschussek/exceptionfix (PR symfony#6582)
This PR was merged into the master branch. Commits ------- 184c8e5 Fixed @ExpectedException definitions to reference absolute exception paths Discussion ---------- Added leading slashes to @ExpectedException definitions Bug fix: no Feature addition: no Backwards compatibility break: no Symfony2 tests pass: yes Fixes the following tickets: - Todo: - License of the code: MIT Documentation PR: - This PR adds leading backslashes `\` to `@expectedException` declarations. The current version is inconsistent with other class references in doc blocks, which default to *relative* class names unless class name has a leading backslash. ```php /** * @param RelativeNs\Class $param1 * @param \AbsoluteNs\Clas 10000 s $param2 */ but /** * @ExpectedException AbsoluteNs\Class */ ``` Consequently, PHPStorm does not understand the current statements and marks them as erroneous (and correctly so IMO, even though PHPUnit's interpretation is more relaxed).
2 parents 6250476 + 184c8e5 commit 47b3f86

File tree

109 files changed

+322
-322
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+322
-322
lines changed

src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/EntityChoiceListTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ protected function tearDown()
7070
}
7171

7272
/**
73-
* @expectedException Symfony\Component\Form\Exception\FormException
73+
* @expectedException \Symfony\Component\Form\Exception\FormException
7474
* @expectedMessage Entity "Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIdentEntity" passed to the choice field must have a "__toString()" method defined (or you can also override the "property" option).
7575
*/
7676
public function testEntitiesMustHaveAToStringMethod()
@@ -97,7 +97,7 @@ public function testEntitiesMustHaveAToStringMethod()
9797
}
9898

9999
/**
100-
* @expectedException Symfony\Component\Form\Exception\FormException
100+
* @expectedException \Symfony\Component\Form\Exception\FormException
101101
*/
102102
public function testChoicesMustBeManaged()
103103
{

src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ protected function persist(array $entities)
111111
}
112112

113113
/**
114-
* @expectedException Symfony\Component\OptionsResolver\Exception\MissingOptionsException
114+
* @expectedException \Symfony\Component\OptionsResolver\Exception\MissingOptionsException
115115
*/
116116
public function testClassOptionIsRequired()
117117
{
@@ -171,7 +171,7 @@ public function testSetDataToUninitializedEntityWithNonRequiredQueryBuilder()
171171
}
172172

173173
/**
174-
* @expectedException Symfony\Component\Form\Exception\UnexpectedTypeException
174+
* @expectedException \Symfony\Component\Form\Exception\UnexpectedTypeException
175175
*/
176176
public function testConfigureQueryBuilderWithNonQueryBuilderAndNonClosure()
177177
{
@@ -183,7 +183,7 @@ public function testConfigureQueryBuilderWithNonQueryBuilderAndNonClosure()
183183
}
184184

185185
/**
186-
* @expectedException Symfony\Component\Form\Exception\UnexpectedTypeException
186+
* @expectedException \Symfony\Component\Form\Exception\UnexpectedTypeException
187187
*/
188188
public function testConfigureQueryBuilderWithClosureReturningNonQueryBuilder()
189189
{

src/Symfony/Bridge/Propel1/Tests/Form/Type/TranslationCollectionTypeTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public function testNotPresentTranslationsAdded()
9696
}
9797

9898
/**
99-
* @expectedException Symfony\Component\Form\Exception\UnexpectedTypeException
99+
* @expectedException \Symfony\Component\Form\Exception\UnexpectedTypeException
100100
*/
101101
public function testNoArrayGiven()
102102
{
@@ -118,7 +118,7 @@ public function testNoArrayGiven()
118118
}
119119

120120
/**
121-
* @expectedException Symfony\Component\OptionsResolver\Exception\MissingOptionsException
121+
* @expectedException \Symfony\Component\OptionsResolver\Exception\MissingOptionsException
122122
*/
123123
public function testNoDataClassAdded()
124124
{
@@ -131,7 +131,7 @@ public function testNoDataClassAdded()
131131
}
132132

133133
/**
134-
* @expectedException Symfony\Component\OptionsResolver\Exception\MissingOptionsException
134+
* @expectedException \Symfony\Component\OptionsResolver\Exception\MissingOptionsException
135135
*/
136136
public function testNoLanguagesAdded()
137137
{
@@ -144,7 +144,7 @@ public function testNoLanguagesAdded()
144144
}
145145

146146
/**
147-
* @expectedException Symfony\Component\OptionsResolver\Exception\MissingOptionsException
147+
* @expectedException \Symfony\Component\OptionsResolver\Exception\MissingOptionsException
148148
*/
149149
public function testNoColumnsAdded()
150150
{

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function getTestValidTrustedProxiesData()
6060
}
6161

6262
/**
63-
* @expectedException Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
63+
* @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
6464
*/
6565
public function testInvalidTypeTrustedProxies()
6666
{
@@ -70,7 +70,7 @@ public function testInvalidTypeTrustedProxies()
7070
}
7171

7272
/**
73-
* @expectedException Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
73+
* @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
7474
*/
7575
public function testInvalidValueTrustedProxies()
7676
{

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function testRouter()
7373
}
7474

7575
/**
76-
* @expectedException Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
76+
* @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
7777
*/
7878
public function testRouterRequiresResourceOption()
7979
{
@@ -211,7 +211,7 @@ public function testTranslator()
211211
}
212212

213213
/**
214-
* @expectedException Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
214+
* @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
215215
*/
216216
public function testTemplatingRequiresAtLeastOneEngine()
217217
{

src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/ConfigurationTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class ConfigurationTest extends \PHPUnit_Framework_TestCase
3434
);
3535

3636
/**
37-
* @expectedException Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
37+
* @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
3838
*/
3939
public function testNoConfigForProvider()
4040
{
@@ -50,7 +50,7 @@ public function testNoConfigForProvider()
5050
}
5151

5252
/**
53-
* @expectedException Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
53+
* @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
5454
*/
5555
public function testManyConfigForProvider()
5656
{

src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Compiler/TwigLoaderPassTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function testMapperPassWithTwoTaggedLoaders()
6969
}
7070

7171
/**
72-
* @expectedException Symfony\Component\DependencyInjection\Exception\LogicException
72+
* @expectedException \Symfony\Component\DependencyInjection\Exception\LogicException
7373
*/
7474
public function testMapperPassWithZeroTaggedLoaders()
7575
{

src/Symfony/Bundle/WebProfilerBundle/Tests/Profiler/TemplateManagerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function setUp()
5757
}
5858

5959
/**
60-
* @expectedException Symfony\Component\HttpKernel\Exception\NotFoundHttpException
60+
* @expectedException \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
6161
*/
6262
public function testGetNameOfInvalidTemplate()
6363
{

src/Symfony/Component/Config/Tests/Definition/ArrayNodeTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
class ArrayNodeTest extends \PHPUnit_Framework_TestCase
1717
{
1818
/**
19-
* @expectedException Symfony\Component\Config\Definition\Exception\InvalidTypeException
19+
* @expectedException \Symfony\Component\Config\Definition\Exception\InvalidTypeException
2020
*/
2121
public function testNormalizeThrowsExceptionWhenFalseIsNotAllowed()
2222
{

src/Symfony/Component/Config/Tests/Definition/BooleanNodeTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function getValidValues()
3434

3535
/**
3636
* @dataProvider getInvalidValues
37-
* @expectedException Symfony\Component\Config\Definition\Exception\InvalidTypeException
37+
* @expectedException \Symfony\Component\Config\Definition\Exception\InvalidTypeException
3838
*/
3939
public function testNormalizeThrowsExceptionOnInvalidValues($value)
4040
{

0 commit comments

Comments
 (0)
0