Skip to content

Commit

Permalink
[2.7] add @group legacy
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Mar 13, 2015
1 parent 4ab2222 commit 70fc4c7
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Tests/Constraints/CallbackValidatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ public function testArrayCallableExplicitName()
}

// BC with Symfony < 2.4
/**
* @group legacy
*/
public function testLegacySingleMethodBc()
{
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
Expand All @@ -201,6 +204,9 @@ public function testLegacySingleMethodBc()
}

// BC with Symfony < 2.4
/**
* @group legacy
*/
public function testLegacySingleMethodBcExplicitName()
{
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
Expand All @@ -216,6 +222,9 @@ public function testLegacySingleMethodBcExplicitName()
}

// BC with Symfony < 2.4
/**
* @group legacy
*/
public function testLegacyMultipleMethodsBc()
{
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
Expand All @@ -233,6 +242,9 @@ public function testLegacyMultipleMethodsBc()
}

// BC with Symfony < 2.4
/**
* @group legacy
*/
public function testLegacyMultipleMethodsBcExplicitName()
{
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
Expand All @@ -252,6 +264,9 @@ public function testLegacyMultipleMethodsBcExplicitName()
}

// BC with Symfony < 2.4
/**
* @group legacy
*/
public function testLegacySingleStaticMethodBc()
{
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
Expand All @@ -269,6 +284,9 @@ public function testLegacySingleStaticMethodBc()
}

// BC with Symfony < 2.4
/**
* @group legacy
*/
public function testLegacySingleStaticMethodBcExplicitName()
{
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
Expand Down Expand Up @@ -307,6 +325,7 @@ public function testExpectValidCallbacks()

/**
* @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException
* @group legacy
*/
public function testLegacyExpectEitherCallbackOrMethods()
{
Expand Down
13 changes: 13 additions & 0 deletions Tests/Constraints/GroupSequenceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ public function testCreateDoctrineStyle()
$this->assertSame(array('Group 1', 'Group 2'), $sequence->groups);
}

/**
* @group legacy
*/
public function testLegacyIterate()
{
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
Expand All @@ -41,6 +44,9 @@ public function testLegacyIterate()
$this->assertSame(array('Group 1', 'Group 2'), iterator_to_array($sequence));
}

/**
* @group legacy
*/
public function testLegacyCount()
{
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
Expand All @@ -50,6 +56,9 @@ public function testLegacyCount()
$this->assertCount(2, $sequence);
}

/**
* @group legacy
*/
public function testLegacyArrayAccess()
{
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
Expand All @@ -72,6 +81,7 @@ public function testLegacyArrayAccess()

/**
* @expectedException \Symfony\Component\Validator\Exception\OutOfBoundsException
* @group legacy
*/
public function testLegacyGetExpectsExistingKey()
{
Expand All @@ -82,6 +92,9 @@ public function testLegacyGetExpectsExistingKey()
$sequence[2];
}

/**
* @group legacy
*/
public function testLegacyUnsetIgnoresNonExistingKeys()
{
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
Expand Down
3 changes: 3 additions & 0 deletions Tests/LegacyValidatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
use Symfony\Component\Validator\Tests\Validator\AbstractLegacyApiTest;
use Symfony\Component\Validator\Validator as LegacyValidator;

/**
* @group legacy
*/
class LegacyValidatorTest extends AbstractLegacyApiTest
{
protected function createValidator(MetadataFactoryInterface $metadataFactory, array $objectInitializers = array())
Expand Down
9 changes: 9 additions & 0 deletions Tests/Mapping/MemberMetadataTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ protected function tearDown()
$this->metadata = null;
}

/**
* @group legacy
*/
public function testLegacyAddValidSetsMemberToCascaded()
{
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
Expand All @@ -46,6 +49,9 @@ public function testLegacyAddValidSetsMemberToCascaded()
$this->assertTrue($this->metadata->isCascaded());
}

/**
* @group legacy
*/
public function testLegacyAddOtherConstraintDoesNotSetMemberToCascaded()
{
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
Expand Down Expand Up @@ -83,6 +89,9 @@ public function testSerializeCollectionCascaded()
$this->assertEquals($this->metadata, $metadata);
}

/**
* @group legacy
*/
public function testLegacySerializeCollectionCascadedDeeply()
{
$this->metadata->addConstraint(new Valid(array('traverse' => true)));
Expand Down

0 comments on commit 70fc4c7

Please sign in to comment.