[2.7] add @group legacy

This commit is contained in:
Nicolas Grekas 2015-03-13 18:49:40 +01:00
parent 099622deb4
commit eb728c5e4c
44 changed files with 183 additions and 3 deletions

View File

@ -46,5 +46,5 @@ install:
script: script:
- if [ "$deps" = "no" ]; then echo "$components" | parallel --gnu --keep-order 'echo -e "\\nRunning {} tests"; phpunit --exclude-group tty,benchmark,intl-data {} || (echo -e "\\e[41mKO\\e[0m {}" && $(exit 1));'; fi; - if [ "$deps" = "no" ]; then echo "$components" | parallel --gnu --keep-order 'echo -e "\\nRunning {} tests"; phpunit --exclude-group tty,benchmark,intl-data {} || (echo -e "\\e[41mKO\\e[0m {}" && $(exit 1));'; fi;
- if [ "$deps" = "no" ]; then echo -e "\\nRunning tests requiring tty"; phpunit --group tty || (echo -e "\\e[41mKO\\e[0m tty group" && $(exit 1)); fi; - if [ "$deps" = "no" ]; then echo -e "\\nRunning tests requiring tty"; phpunit --group tty || (echo -e "\\e[41mKO\\e[0m tty group" && $(exit 1)); fi;
- if [ "$deps" = "high" ]; then echo "$components" | parallel --gnu --keep-order -j25% 'echo -e "\\nRunning {} tests"; cd {}; composer --prefer-source update; phpunit --exclude-group tty,benchmark,intl-data || (echo -e "\\e[41mKO\\e[0m {}" && $(exit 1));'; fi; - if [ "$deps" = "high" ]; then echo "$components" | parallel --gnu --keep-order -j25% 'echo -e "\\nRunning {} tests"; cd {}; composer --prefer-source update; phpunit --exclude-group tty,benchmark,intl-data,legacy || (echo -e "\\e[41mKO\\e[0m {}" && $(exit 1));'; fi;
- if [ "$deps" = "low" ]; then echo "$components" | parallel --gnu --keep-order -j25% 'echo -e "\\nRunning {} tests"; cd {}; composer --prefer-source --prefer-lowest --prefer-stable update; phpunit --exclude-group tty,benchmark,intl-data || (echo -e "\\e[41mKO\\e[0m {}" && $(exit 1));'; fi; - if [ "$deps" = "low" ]; then echo "$components" | parallel --gnu --keep-order -j25% 'echo -e "\\nRunning {} tests"; cd {}; composer --prefer-source --prefer-lowest --prefer-stable update; phpunit --exclude-group tty,benchmark,intl-data || (echo -e "\\e[41mKO\\e[0m {}" && $(exit 1));'; fi;

View File

@ -18,6 +18,9 @@ use Symfony\Component\Asset\VersionStrategy\StaticVersionStrategy;
class AssetExtensionTest extends \PHPUnit_Framework_TestCase class AssetExtensionTest extends \PHPUnit_Framework_TestCase
{ {
/**
* @group legacy
*/
public function testLegacyGetAssetUrl() public function testLegacyGetAssetUrl()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);

View File

@ -66,7 +66,10 @@ abstract class AbstractDescriptorTest extends \PHPUnit_Framework_TestCase
return $this->getContainerBuilderDescriptionTestData(ObjectsProvider::getContainerBuilders()); return $this->getContainerBuilderDescriptionTestData(ObjectsProvider::getContainerBuilders());
} }
/** @dataProvider provideLegacySynchronizedServiceDefinitionTestData */ /**
* @dataProvider provideLegacySynchronizedServiceDefinitionTestData
* @group legacy
*/
public function testLegacyDescribeSynchronizedServiceDefinition(Definition $definition, $expectedDescription) public function testLegacyDescribeSynchronizedServiceDefinition(Definition $definition, $expectedDescription)
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);

View File

@ -15,6 +15,9 @@ use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\FragmentRendererPass; use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\FragmentRendererPass;
/**
* @group legacy
*/
class LegacyFragmentRendererPassTest extends \PHPUnit_Framework_TestCase class LegacyFragmentRendererPassTest extends \PHPUnit_Framework_TestCase
{ {
protected function setUp() protected function setUp()

View File

@ -16,6 +16,9 @@ use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\Reference;
/**
* @group legacy
*/
class LegacyTemplatingAssetHelperPassTest extends \PHPUnit_Framework_TestCase class LegacyTemplatingAssetHelperPassTest extends \PHPUnit_Framework_TestCase
{ {
protected function setUp() protected function setUp()

View File

@ -89,6 +89,7 @@ class ConfigurationTest extends \PHPUnit_Framework_TestCase
/** /**
* @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
* @expectedExceptionMessage You cannot use assets settings under "framework.templating" and "assets" configurations in the same project. * @expectedExceptionMessage You cannot use assets settings under "framework.templating" and "assets" configurations in the same project.
* @group legacy
*/ */
public function testLegacyInvalidValueAssets() public function testLegacyInvalidValueAssets()
{ {

View File

@ -203,6 +203,9 @@ abstract class FrameworkExtensionTest extends TestCase
$this->assertEquals('global_hinclude_template', $container->getParameter('fragment.renderer.hinclude.global_template'), '->registerTemplatingConfiguration() registers the global hinclude.js template'); $this->assertEquals('global_hinclude_template', $container->getParameter('fragment.renderer.hinclude.global_template'), '->registerTemplatingConfiguration() registers the global hinclude.js template');
} }
/**
* @group legacy
*/
public function testLegacyTemplatingAssets() public function testLegacyTemplatingAssets()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
@ -290,6 +293,9 @@ abstract class FrameworkExtensionTest extends TestCase
$this->assertEquals(array(Validation::API_VERSION_2_5_BC), $calls[6][1]); $this->assertEquals(array(Validation::API_VERSION_2_5_BC), $calls[6][1]);
} }
/**
* @group legacy
*/
public function testLegacyFullyConfiguredValidationService() public function testLegacyFullyConfiguredValidationService()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
@ -452,6 +458,9 @@ abstract class FrameworkExtensionTest extends TestCase
$this->assertFalse($container->getParameter('form.type_extension.csrf.enabled')); $this->assertFalse($container->getParameter('form.type_extension.csrf.enabled'));
} }
/**
* @group legacy
*/
public function testLegacyFormCsrfFieldNameCanBeSetUnderCsrfSettings() public function testLegacyFormCsrfFieldNameCanBeSetUnderCsrfSettings()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
@ -462,6 +471,9 @@ abstract class FrameworkExtensionTest extends TestCase
$this->assertEquals('_custom', $container->getParameter('form.type_extension.csrf.field_name')); $this->assertEquals('_custom', $container->getParameter('form.type_extension.csrf.field_name'));
} }
/**
* @group legacy
*/
public function testLegacyFormCsrfFieldNameUnderFormSettingsTakesPrecedence() public function testLegacyFormCsrfFieldNameUnderFormSettingsTakesPrecedence()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);

View File

@ -15,6 +15,9 @@ use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
use Symfony\Bundle\FrameworkBundle\Fragment\ContainerAwareHIncludeFragmentRenderer; use Symfony\Bundle\FrameworkBundle\Fragment\ContainerAwareHIncludeFragmentRenderer;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
/**
* @group legacy
*/
class LegacyContainerAwareHIncludeFragmentRendererTest extends TestCase class LegacyContainerAwareHIncludeFragmentRendererTest extends TestCase
{ {
public function testRender() public function testRender()

View File

@ -18,6 +18,9 @@ use Symfony\Component\Asset\VersionStrategy\StaticVersionStrategy;
class AssetsHelperTest extends \PHPUnit_Framework_TestCase class AssetsHelperTest extends \PHPUnit_Framework_TestCase
{ {
/**
* @group legacy
*/
public function testLegacyGetUrl() public function testLegacyGetUrl()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
@ -29,6 +32,9 @@ class AssetsHelperTest extends \PHPUnit_Framework_TestCase
$this->assertEquals('me.png?version=42', $helper->getUrl('me.png', null, '42')); $this->assertEquals('me.png?version=42', $helper->getUrl('me.png', null, '42'));
} }
/**
* @group legacy
*/
public function testLegacyGetVersion() public function testLegacyGetVersion()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);

View File

@ -40,6 +40,9 @@ class SecurityDataCollectorTest extends \PHPUnit_Framework_TestCase
$this->assertEmpty($collector->getUser()); $this->assertEmpty($collector->getUser());
} }
/**
* @group legacy
*/
public function testLegacyCollectWhenAuthenticationTokenIsNull() public function testLegacyCollectWhenAuthenticationTokenIsNull()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);

View File

@ -25,6 +25,7 @@ class TwigExtensionTest extends TestCase
{ {
/** /**
* @dataProvider getFormats * @dataProvider getFormats
* @group legacy
*/ */
public function testLegacyFormResourcesConfigurationKey($format) public function testLegacyFormResourcesConfigurationKey($format)
{ {
@ -44,6 +45,7 @@ class TwigExtensionTest extends TestCase
/** /**
* @dataProvider getFormats * @dataProvider getFormats
* @group legacy
*/ */
public function testLegacyMergeFormResourcesConfigurationKeyWithFormThemesConfigurationKey($format) public function testLegacyMergeFormResourcesConfigurationKeyWithFormThemesConfigurationKey($format)
{ {

View File

@ -35,7 +35,6 @@ class ClassNotFoundFatalErrorHandlerTest extends \PHPUnit_Framework_TestCase
} }
/** /**
* @group legacy
* @dataProvider provideLegacyClassNotFoundData * @dataProvider provideLegacyClassNotFoundData
* @group legacy * @group legacy
*/ */

View File

@ -52,6 +52,7 @@ class CheckDefinitionValidityPassTest extends \PHPUnit_Framework_TestCase
/** /**
* @expectedException \Symfony\Component\DependencyInjection\Exception\RuntimeException * @expectedException \Symfony\Component\DependencyInjection\Exception\RuntimeException
* @group legacy
*/ */
public function testLegacyProcessDetectsBothFactorySyntaxesUsed() public function testLegacyProcessDetectsBothFactorySyntaxesUsed()
{ {

View File

@ -684,6 +684,9 @@ class ContainerBuilderTest extends \PHPUnit_Framework_TestCase
$this->assertEquals($a, $container->get('a')); $this->assertEquals($a, $container->get('a'));
} }
/**
* @group legacy
*/
public function testLegacySetOnSynchronizedService() public function testLegacySetOnSynchronizedService()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
@ -703,6 +706,9 @@ class ContainerBuilderTest extends \PHPUnit_Framework_TestCase
$this->assertSame($baz, $container->get('bar')->getBaz()); $this->assertSame($baz, $container->get('bar')->getBaz());
} }
/**
* @group legacy
*/
public function testLegacySynchronizedServiceWithScopes() public function testLegacySynchronizedServiceWithScopes()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);

View File

@ -51,6 +51,7 @@ class DefinitionDecoratorTest extends \PHPUnit_Framework_TestCase
/** /**
* @dataProvider provideLegacyPropertyTests * @dataProvider provideLegacyPropertyTests
* @group legacy
*/ */
public function testLegacySetProperty($property, $changeKey) public function testLegacySetProperty($property, $changeKey)
{ {

View File

@ -166,6 +166,7 @@ class DefinitionTest extends \PHPUnit_Framework_TestCase
/** /**
* @covers Symfony\Component\DependencyInjection\Definition::setSynchronized * @covers Symfony\Component\DependencyInjection\Definition::setSynchronized
* @covers Symfony\Component\DependencyInjection\Definition::isSynchronized * @covers Symfony\Component\DependencyInjection\Definition::isSynchronized
* @group legacy
*/ */
public function testLegacySetIsSynchronized() public function testLegacySetIsSynchronized()
{ {

View File

@ -23,6 +23,9 @@ class GraphvizDumperTest extends \PHPUnit_Framework_TestCase
self::$fixturesPath = __DIR__.'/../Fixtures/'; self::$fixturesPath = __DIR__.'/../Fixtures/';
} }
/**
* @group legacy
*/
public function testLegacyDump() public function testLegacyDump()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);

View File

@ -124,6 +124,9 @@ class PhpDumperTest extends \PHPUnit_Framework_TestCase
} }
} }
/**
* @group legacy
*/
public function testLegacySynchronizedServices() public function testLegacySynchronizedServices()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);

View File

@ -47,6 +47,9 @@ class XmlDumperTest extends \PHPUnit_Framework_TestCase
$this->assertXmlStringEqualsXmlFile(self::$fixturesPath.'/xml/services8.xml', $dumper->dump(), '->dump() dumps parameters'); $this->assertXmlStringEqualsXmlFile(self::$fixturesPath.'/xml/services8.xml', $dumper->dump(), '->dump() dumps parameters');
} }
/**
* @group legacy
*/
public function testLegacyAddService() public function testLegacyAddService()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);

View File

@ -40,6 +40,9 @@ class YamlDumperTest extends \PHPUnit_Framework_TestCase
$this->assertStringEqualsFile(self::$fixturesPath.'/yaml/services8.yml', $dumper->dump(), '->dump() dumps parameters'); $this->assertStringEqualsFile(self::$fixturesPath.'/yaml/services8.yml', $dumper->dump(), '->dump() dumps parameters');
} }
/**
* @group legacy
*/
public function testLegacyAddService() public function testLegacyAddService()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);

View File

@ -191,6 +191,9 @@ class XmlFileLoaderTest extends \PHPUnit_Framework_TestCase
$this->assertEquals('BazClass', $inner->getClass(), '->load() uses the same configuration as for the anonymous ones'); $this->assertEquals('BazClass', $inner->getClass(), '->load() uses the same configuration as for the anonymous ones');
} }
/**
* @group legacy
*/
public function testLegacyLoadServices() public function testLegacyLoadServices()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);

View File

@ -120,6 +120,9 @@ class YamlFileLoaderTest extends \PHPUnit_Framework_TestCase
$loader->load('services4_bad_import.yml'); $loader->load('services4_bad_import.yml');
} }
/**
* @group legacy
*/
public function testLegacyLoadServices() public function testLegacyLoadServices()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);

View File

@ -121,6 +121,9 @@ abstract class AbstractEventDispatcherTest extends \PHPUnit_Framework_TestCase
$this->assertSame($event, $return); $this->assertSame($event, $return);
} }
/**
* @group legacy
*/
public function testLegacyDispatch() public function testLegacyDispatch()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
@ -247,6 +250,9 @@ abstract class AbstractEventDispatcherTest extends \PHPUnit_Framework_TestCase
$this->assertFalse($this->dispatcher->hasListeners(self::preFoo)); $this->assertFalse($this->dispatcher->hasListeners(self::preFoo));
} }
/**
* @group legacy
*/
public function testLegacyEventReceivesTheDispatcherInstance() public function testLegacyEventReceivesTheDispatcherInstance()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);

View File

@ -807,6 +807,9 @@ class CompoundFormTest extends AbstractFormTest
$this->assertEquals(array('extra' => 'data'), $form->getExtraData()); $this->assertEquals(array('extra' => 'data'), $form->getExtraData());
} }
/**
* @group legacy
*/
public function testLegacyGetErrorsAsStringDeep() public function testLegacyGetErrorsAsStringDeep()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
@ -828,6 +831,9 @@ class CompoundFormTest extends AbstractFormTest
); );
} }
/**
* @group legacy
*/
public function testLegacyGetErrorsAsStringDeepWithIndentation() public function testLegacyGetErrorsAsStringDeepWithIndentation()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);

View File

@ -637,6 +637,9 @@ class FormTypeTest extends BaseTypeTest
$this->assertSame('0', $view->vars['label']); $this->assertSame('0', $view->vars['label']);
} }
/**
* @group legacy
*/
public function testLegacyCanGetErrorsWhenButtonInForm() public function testLegacyCanGetErrorsWhenButtonInForm()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);

View File

@ -733,6 +733,9 @@ class SimpleFormTest extends AbstractFormTest
$this->assertSame($view, $form->createView($parentView)); $this->assertSame($view, $form->createView($parentView));
} }
/**
* @group legacy
*/
public function testLegacyGetErrorsAsString() public function testLegacyGetErrorsAsString()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);

View File

@ -134,6 +134,7 @@ class FlashBagTest extends \PHPUnit_Framework_TestCase
/** /**
* @covers Symfony\Component\HttpFoundation\Session\Flash\FlashBag::getIterator * @covers Symfony\Component\HttpFoundation\Session\Flash\FlashBag::getIterator
* @group legacy
*/ */
public function testLegacyGetIterator() public function testLegacyGetIterator()
{ {

View File

@ -18,6 +18,9 @@ use Symfony\Component\HttpKernel\Fragment\FragmentRendererInterface;
class FragmentRendererPassTest extends \PHPUnit_Framework_TestCase class FragmentRendererPassTest extends \PHPUnit_Framework_TestCase
{ {
/**
* @group legacy
*/
public function testLegacyFragmentRedererWithoutAlias() public function testLegacyFragmentRedererWithoutAlias()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);

View File

@ -234,6 +234,7 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase
/** /**
* @dataProvider provideLegacyInputValues * @dataProvider provideLegacyInputValues
* @group legacy
*/ */
public function testLegacyValidInput($expected, $value) public function testLegacyValidInput($expected, $value)
{ {

View File

@ -456,6 +456,9 @@ class UrlGeneratorTest extends \PHPUnit_Framework_TestCase
$this->assertSame('//EN.FooBar.com/app.php/', $generator->generate('test', array('locale' => 'EN'), UrlGeneratorInterface::NETWORK_PATH)); $this->assertSame('//EN.FooBar.com/app.php/', $generator->generate('test', array('locale' => 'EN'), UrlGeneratorInterface::NETWORK_PATH));
} }
/**
* @group legacy
*/
public function testLegacyGenerateNetworkPath() public function testLegacyGenerateNetworkPath()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);

View File

@ -45,6 +45,9 @@ class XmlFileLoaderTest extends \PHPUnit_Framework_TestCase
$this->assertEquals('context.getMethod() == "GET"', $route->getCondition()); $this->assertEquals('context.getMethod() == "GET"', $route->getCondition());
} }
/**
* @group legacy
*/
public function testLegacyRouteDefinitionLoading() public function testLegacyRouteDefinitionLoading()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);

View File

@ -79,6 +79,9 @@ class YamlFileLoaderTest extends \PHPUnit_Framework_TestCase
$this->assertEquals('context.getMethod() == "GET"', $route->getCondition()); $this->assertEquals('context.getMethod() == "GET"', $route->getCondition());
} }
/**
* @group legacy
*/
public function testLegacyRouteDefinitionLoading() public function testLegacyRouteDefinitionLoading()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);

View File

@ -164,6 +164,9 @@ class RouteTest extends \PHPUnit_Framework_TestCase
$this->assertTrue($route->hasScheme('httpS')); $this->assertTrue($route->hasScheme('httpS'));
} }
/**
* @group legacy
*/
public function testLegacySchemeRequirement() public function testLegacySchemeRequirement()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
@ -191,6 +194,9 @@ class RouteTest extends \PHPUnit_Framework_TestCase
$this->assertEquals(array('GET', 'POST'), $route->getMethods(), '->setMethods() accepts an array of methods and uppercases them'); $this->assertEquals(array('GET', 'POST'), $route->getMethods(), '->setMethods() accepts an array of methods and uppercases them');
} }
/**
* @group legacy
*/
public function testLegacyMethodRequirement() public function testLegacyMethodRequirement()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);

View File

@ -15,6 +15,9 @@ use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage;
use Symfony\Component\Security\Core\Authorization\AuthorizationChecker; use Symfony\Component\Security\Core\Authorization\AuthorizationChecker;
use Symfony\Component\Security\Core\SecurityContext; use Symfony\Component\Security\Core\SecurityContext;
/**
* @group legacy
*/
class LegacySecurityContextTest extends \PHPUnit_Framework_TestCase class LegacySecurityContextTest extends \PHPUnit_Framework_TestCase
{ {
private $tokenStorage; private $tokenStorage;

View File

@ -99,6 +99,9 @@ class GetSetMethodNormalizerTest extends \PHPUnit_Framework_TestCase
$this->assertEquals('bar', $obj->getBar()); $this->assertEquals('bar', $obj->getBar());
} }
/**
* @group legacy
*/
public function testLegacyDenormalizeOnCamelCaseFormat() public function testLegacyDenormalizeOnCamelCaseFormat()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
@ -117,6 +120,9 @@ class GetSetMethodNormalizerTest extends \PHPUnit_Framework_TestCase
$this->assertEquals(new GetSetDummy(), $this->normalizer->denormalize(null, __NAMESPACE__.'\GetSetDummy')); $this->assertEquals(new GetSetDummy(), $this->normalizer->denormalize(null, __NAMESPACE__.'\GetSetDummy'));
} }
/**
* @group legacy
*/
public function testLegacyCamelizedAttributesNormalize() public function testLegacyCamelizedAttributesNormalize()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
@ -140,6 +146,9 @@ class GetSetMethodNormalizerTest extends \PHPUnit_Framework_TestCase
)); ));
} }
/**
* @group legacy
*/
public function testLegacyCamelizedAttributesDenormalize() public function testLegacyCamelizedAttributesDenormalize()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);

View File

@ -96,6 +96,9 @@ class ObjectNormalizerTest extends \PHPUnit_Framework_TestCase
$this->assertEquals('bar', $obj->bar); $this->assertEquals('bar', $obj->bar);
} }
/**
* @group legacy
*/
public function testLegacyDenormalizeOnCamelCaseFormat() public function testLegacyDenormalizeOnCamelCaseFormat()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);

View File

@ -62,6 +62,9 @@ class PropertyNormalizerTest extends \PHPUnit_Framework_TestCase
$this->assertEquals('bar', $obj->getBar()); $this->assertEquals('bar', $obj->getBar());
} }
/**
* @group legacy
*/
public function testLegacyDenormalizeOnCamelCaseFormat() public function testLegacyDenormalizeOnCamelCaseFormat()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
@ -74,6 +77,9 @@ class PropertyNormalizerTest extends \PHPUnit_Framework_TestCase
$this->assertEquals('value', $obj->getCamelCase()); $this->assertEquals('value', $obj->getCamelCase());
} }
/**
* @group legacy
*/
public function testLegacyCamelizedAttributesNormalize() public function testLegacyCamelizedAttributesNormalize()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
@ -97,6 +103,9 @@ class PropertyNormalizerTest extends \PHPUnit_Framework_TestCase
)); ));
} }
/**
* @group legacy
*/
public function testLegacyCamelizedAttributesDenormalize() public function testLegacyCamelizedAttributesDenormalize()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);

View File

@ -13,6 +13,9 @@ namespace Symfony\Component\Templating\Tests\Helper;
use Symfony\Component\Templating\Helper\AssetsHelper; use Symfony\Component\Templating\Helper\AssetsHelper;
/**
* @group legacy
*/
class LegacyAssetsHelperTest extends \PHPUnit_Framework_TestCase class LegacyAssetsHelperTest extends \PHPUnit_Framework_TestCase
{ {
protected function setUp() protected function setUp()

View File

@ -13,6 +13,9 @@ namespace Symfony\Component\Templating\Tests\Helper;
use Symfony\Component\Templating\Helper\CoreAssetsHelper; use Symfony\Component\Templating\Helper\CoreAssetsHelper;
/**
* @group legacy
*/
class LegacyCoreAssetsHelperTest extends \PHPUnit_Framework_TestCase class LegacyCoreAssetsHelperTest extends \PHPUnit_Framework_TestCase
{ {
protected $package; protected $package;

View File

@ -186,6 +186,9 @@ class CallbackValidatorTest extends AbstractConstraintValidatorTest
} }
// BC with Symfony < 2.4 // BC with Symfony < 2.4
/**
* @group legacy
*/
public function testLegacySingleMethodBc() public function testLegacySingleMethodBc()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
@ -201,6 +204,9 @@ class CallbackValidatorTest extends AbstractConstraintValidatorTest
} }
// BC with Symfony < 2.4 // BC with Symfony < 2.4
/**
* @group legacy
*/
public function testLegacySingleMethodBcExplicitName() public function testLegacySingleMethodBcExplicitName()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
@ -216,6 +222,9 @@ class CallbackValidatorTest extends AbstractConstraintValidatorTest
} }
// BC with Symfony < 2.4 // BC with Symfony < 2.4
/**
* @group legacy
*/
public function testLegacyMultipleMethodsBc() public function testLegacyMultipleMethodsBc()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
@ -233,6 +242,9 @@ class CallbackValidatorTest extends AbstractConstraintValidatorTest
} }
// BC with Symfony < 2.4 // BC with Symfony < 2.4
/**
* @group legacy
*/
public function testLegacyMultipleMethodsBcExplicitName() public function testLegacyMultipleMethodsBcExplicitName()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
@ -252,6 +264,9 @@ class CallbackValidatorTest extends AbstractConstraintValidatorTest
} }
// BC with Symfony < 2.4 // BC with Symfony < 2.4
/**
* @group legacy
*/
public function testLegacySingleStaticMethodBc() public function testLegacySingleStaticMethodBc()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
@ -269,6 +284,9 @@ class CallbackValidatorTest extends AbstractConstraintValidatorTest
} }
// BC with Symfony < 2.4 // BC with Symfony < 2.4
/**
* @group legacy
*/
public function testLegacySingleStaticMethodBcExplicitName() public function testLegacySingleStaticMethodBcExplicitName()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
@ -307,6 +325,7 @@ class CallbackValidatorTest extends AbstractConstraintValidatorTest
/** /**
* @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException
* @group legacy
*/ */
public function testLegacyExpectEitherCallbackOrMethods() public function testLegacyExpectEitherCallbackOrMethods()
{ {

View File

@ -32,6 +32,9 @@ class GroupSequenceTest extends \PHPUnit_Framework_TestCase
$this->assertSame(array('Group 1', 'Group 2'), $sequence->groups); $this->assertSame(array('Group 1', 'Group 2'), $sequence->groups);
} }
/**
* @group legacy
*/
public function testLegacyIterate() public function testLegacyIterate()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
@ -41,6 +44,9 @@ class GroupSequenceTest extends \PHPUnit_Framework_TestCase
$this->assertSame(array('Group 1', 'Group 2'), iterator_to_array($sequence)); $this->assertSame(array('Group 1', 'Group 2'), iterator_to_array($sequence));
} }
/**
* @group legacy
*/
public function testLegacyCount() public function testLegacyCount()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
@ -50,6 +56,9 @@ class GroupSequenceTest extends \PHPUnit_Framework_TestCase
$this->assertCount(2, $sequence); $this->assertCount(2, $sequence);
} }
/**
* @group legacy
*/
public function testLegacyArrayAccess() public function testLegacyArrayAccess()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
@ -72,6 +81,7 @@ class GroupSequenceTest extends \PHPUnit_Framework_TestCase
/** /**
* @expectedException \Symfony\Component\Validator\Exception\OutOfBoundsException * @expectedException \Symfony\Component\Validator\Exception\OutOfBoundsException
* @group legacy
*/ */
public function testLegacyGetExpectsExistingKey() public function testLegacyGetExpectsExistingKey()
{ {
@ -82,6 +92,9 @@ class GroupSequenceTest extends \PHPUnit_Framework_TestCase
$sequence[2]; $sequence[2];
} }
/**
* @group legacy
*/
public function testLegacyUnsetIgnoresNonExistingKeys() public function testLegacyUnsetIgnoresNonExistingKeys()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);

View File

@ -19,6 +19,9 @@ use Symfony\Component\Validator\Tests\Fixtures\Entity;
use Symfony\Component\Validator\Tests\Validator\AbstractLegacyApiTest; use Symfony\Component\Validator\Tests\Validator\AbstractLegacyApiTest;
use Symfony\Component\Validator\Validator as LegacyValidator; use Symfony\Component\Validator\Validator as LegacyValidator;
/**
* @group legacy
*/
class LegacyValidatorTest extends AbstractLegacyApiTest class LegacyValidatorTest extends AbstractLegacyApiTest
{ {
protected function createValidator(MetadataFactoryInterface $metadataFactory, array $objectInitializers = array()) protected function createValidator(MetadataFactoryInterface $metadataFactory, array $objectInitializers = array())

View File

@ -35,6 +35,9 @@ class MemberMetadataTest extends \PHPUnit_Framework_TestCase
$this->metadata = null; $this->metadata = null;
} }
/**
* @group legacy
*/
public function testLegacyAddValidSetsMemberToCascaded() public function testLegacyAddValidSetsMemberToCascaded()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
@ -46,6 +49,9 @@ class MemberMetadataTest extends \PHPUnit_Framework_TestCase
$this->assertTrue($this->metadata->isCascaded()); $this->assertTrue($this->metadata->isCascaded());
} }
/**
* @group legacy
*/
public function testLegacyAddOtherConstraintDoesNotSetMemberToCascaded() public function testLegacyAddOtherConstraintDoesNotSetMemberToCascaded()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
@ -83,6 +89,9 @@ class MemberMetadataTest extends \PHPUnit_Framework_TestCase
$this->assertEquals($this->metadata, $metadata); $this->assertEquals($this->metadata, $metadata);
} }
/**
* @group legacy
*/
public function testLegacySerializeCollectionCascadedDeeply() public function testLegacySerializeCollectionCascadedDeeply()
{ {
$this->metadata->addConstraint(new Valid(array('traverse' => true))); $this->metadata->addConstraint(new Valid(array('traverse' => true)));

View File

@ -23,6 +23,9 @@ class YamlTest extends \PHPUnit_Framework_TestCase
$this->assertEquals($data, $parsed); $this->assertEquals($data, $parsed);
} }
/**
* @group legacy
*/
public function testLegacyParseFromFile() public function testLegacyParseFromFile()
{ {
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);