8000 [Bridge\Doctrine] Fix declaration of legacy tests · symfony/symfony@62ac4f3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 62ac4f3

Browse files
[Bridge\Doctrine] Fix declaration of legacy tests
1 parent a79b57b commit 62ac4f3

File tree

5 files changed

+13
-17
lines changed

5 files changed

+13
-17
lines changed

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

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ class GenericEntityChoiceListTest extends \PHPUnit_Framework_TestCase
3939

4040
protected function setUp()
4141
{
42-
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
43-
4442
$this->em = DoctrineTestHelper::createTestEntityManager();
4543

4644
$schemaTool = new SchemaTool($this->em);
@@ -75,7 +73,7 @@ protected function tearDown()
7573
* @expectedException \Symfony\Component\Form\Exception\StringCastException
7674
* @expectedMessage Entity "Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdEntity" passed to the choice field must have a "__toString()" method defined (or you can also override the "property" option).
7775
*/
78-
public function testLegacyEntitiesMustHaveAToStringMethod()
76+
public function testEntitiesMustHaveAToStringMethod()
7977
{
8078
$entity1 = new SingleIntIdNoToStringEntity(1, 'Foo');
8179
$entity2 = new SingleIntIdNoToStringEntity(2, 'Bar');
@@ -101,7 +99,7 @@ public function testLegacyEntitiesMustHaveAToStringMethod()
10199
/**
102100
* @expectedException \Symfony\Component\Form\Exception\RuntimeException
103101
*/
104-
public function testLegacyChoicesMustBeManaged()
102+
public function testChoicesMustBeManaged()
105103
{
106104
$entity1 = new SingleIntIdEntity(1, 'Foo');
107105
$entity2 = new SingleIntIdEntity(2, 'Bar');
@@ -123,7 +121,7 @@ public function testLegacyChoicesMustBeManaged()
123121
$choiceList->getChoices();
124122
}
125123

126-
public function testLegacyInitExplicitChoices()
124+
public function testInitExplicitChoices()
127125
{
128126
$entity1 = new SingleIntIdEntity(1, 'Foo');
129127
$entity2 = new SingleIntIdEntity(2, 'Bar');
@@ -146,7 +144,7 @@ public function testLegacyInitExplicitChoices()
146144
$this->assertSame(array(1 => $entity1, 2 => $entity2), $choiceList->getChoices());
147145
}
148146

149-
public function testLegacyInitEmptyChoices()
147+
public function testInitEmptyChoices()
150148
{
151149
$entity1 = new SingleIntIdEntity(1, 'Foo');
152150
$entity2 = new SingleIntIdEntity(2, 'Bar');
@@ -166,7 +164,7 @@ public function testLegacyInitEmptyChoices()
166164
$this->assertSame(array(), $choiceList->getChoices());
167165
}
168166

169-
public function testLegacyInitNestedChoices()
167+
public function testInitNestedChoices()
170168
{
171169
$entity1 = new SingleIntIdEntity(1, 'Foo');
172170
$entity2 = new SingleIntIdEntity(2, 'Bar');
@@ -194,7 +192,7 @@ public function testLegacyInitNestedChoices()
194192
), $choiceList->getRemainingViews());
195193
}
196194

197-
public function testLegacyGroupByPropertyPath()
195+
public function testGroupByPropertyPath()
198196
{
199197
$item1 = new GroupableEntity(1, 'Foo', 'Group1');
200198
$item2 = new GroupableEntity(2, 'Bar', 'Group1');
@@ -229,7 +227,7 @@ public function testLegacyGroupByPropertyPath()
229227
), $choiceList->getRemainingViews());
230228
}
231229

232-
public function testLegacyGroupByInvalidPropertyPathReturnsFlatChoices()
230+
public function testGroupByInvalidPropertyPathReturnsFlatChoices()
233231
{
234232
$item1 = new GroupableEntity(1, 'Foo', 'Group1');
235233
$item2 = new GroupableEntity(2, 'Bar', 'Group1');
@@ -256,7 +254,7 @@ public function testLegacyGroupByInvalidPropertyPathReturnsFlatChoices()
256254
), $choiceList->getChoices());
257255
}
258256

259-
public function testLegacyInitShorthandEntityName()
257+
public function testInitShorthandEntityName()
260258
{
261259
$item1 = new SingleIntIdEntity(1, 'Foo');
262260
$item2 = new SingleIntIdEntity(2, 'Bar');
@@ -272,7 +270,7 @@ public function testLegacyInitShorthandEntityName()
272270
$this->assertEquals(array(1, 2), $choiceList->getValuesForChoices(array($item1, $item2)));
273271
}
274272

275-
public function testLegacyInitShorthandEntityName2()
273+
public function testInitShorthandEntityName2()
276274
{
277275
$item1 = new SingleIntIdEntity(1, 'Foo');
278276
$item2 = new SingleIntIdEntity(2, 'Bar');

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*/
1818
class UnloadedEntityChoiceListCompositeIdTest extends AbstractEntityChoiceListCompositeIdTest
1919
{
20-
public function testLegacyGetIndicesForValuesIgnoresNonExistingValues()
20+
public function testGetIndicesForValuesIgnoresNonExistingValues()
2121
{
2222
$this->markTestSkipped('Non-existing values are not detected for unloaded choice lists.');
2323
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*/
1818
class UnloadedEntityChoiceListSingleIntIdTest extends AbstractEntityChoiceListSingleIntIdTest
1919
{
20-
public function testLegacyGetIndicesForValuesIgnoresNonExistingValues()
20+
public function testGetIndicesForValuesIgnoresNonExistingValues()
2121
{
2222
$this->markTestSkipped('Non-existing values are not detected for unloaded choice lists.');
2323
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*/
1818
class UnloadedEntityChoiceListSingleStringIdTest extends AbstractEntityChoiceListSingleStringIdTest
1919
{
20-
public function testLegacyGetIndicesForValuesIgnoresNonExistingValues()
20+
public function testGetIndicesForValuesIgnoresNonExistingValues()
2121
{
2222
$this->markTestSkipped('Non-existing values are not detected for unloaded choice lists.');
2323
}

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -869,10 +869,8 @@ public function testCacheChoiceLists()
869869
/**
870870
* @group legacy
871871
*/
872-
public function testLegacyPropertyOption()
872+
public function testPropertyOption()
873873
{
874-
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
875-
876874
$entity1 = new SingleIntIdEntity(1, 'Foo');
877875
$entity2 = new SingleIntIdEntity(2, 'Bar');
878876

0 commit comments

Comments
 (0)
0