Merge branch '2.5' into 2.6
* 2.5: [Form] fix Context\ExecutionContextInterface mock [Validator] marks TraversalStrategy::STOP_RECURSION constant internal as it has been introduced for the BC layer and will be removed in 3.0.
This commit is contained in:
commit
3b0db95cc8
@ -269,7 +269,7 @@ class GenericEntityChoiceListTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testLegacyInitShorthandEntityName()
|
public function testLegacyInitShorthandEntityName()
|
||||||
{
|
{
|
||||||
$this->iniSet('error_reporting', -1 & E_USER_DEPRECATED);
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
$item1 = new SingleIntIdEntity(1, 'Foo');
|
$item1 = new SingleIntIdEntity(1, 'Foo');
|
||||||
$item2 = new SingleIntIdEntity(2, 'Bar');
|
$item2 = new SingleIntIdEntity(2, 'Bar');
|
||||||
|
@ -206,7 +206,7 @@ class ModelChoiceListTest extends Propel1TestCase
|
|||||||
|
|
||||||
public function testLegacygetIndicesForChoices()
|
public function testLegacygetIndicesForChoices()
|
||||||
{
|
{
|
||||||
$this->iniSet('error_reporting', -1 & E_USER_DEPRECATED);
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
$item1 = new Item(1, 'Foo');
|
$item1 = new Item(1, 'Foo');
|
||||||
$item2 = new Item(2, 'Bar');
|
$item2 = new Item(2, 'Bar');
|
||||||
@ -230,7 +230,7 @@ class ModelChoiceListTest extends Propel1TestCase
|
|||||||
|
|
||||||
public function testLegacyDifferentEqualObjectsAreChoosen()
|
public function testLegacyDifferentEqualObjectsAreChoosen()
|
||||||
{
|
{
|
||||||
$this->iniSet('error_reporting', -1 & E_USER_DEPRECATED);
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
$item = new Item(1, 'Foo');
|
$item = new Item(1, 'Foo');
|
||||||
|
|
||||||
@ -251,7 +251,7 @@ class ModelChoiceListTest extends Propel1TestCase
|
|||||||
|
|
||||||
public function testLegacyGetIndicesForNullChoices()
|
public function testLegacyGetIndicesForNullChoices()
|
||||||
{
|
{
|
||||||
$this->iniSet('error_reporting', -1 & E_USER_DEPRECATED);
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
$item = new Item(1, 'Foo');
|
$item = new Item(1, 'Foo');
|
||||||
$choiceList = new ModelChoiceList(
|
$choiceList = new ModelChoiceList(
|
||||||
|
@ -482,7 +482,7 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testLegacyAsText()
|
public function testLegacyAsText()
|
||||||
{
|
{
|
||||||
$this->iniSet('error_reporting', -1 & E_USER_DEPRECATED);
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
$application = new Application();
|
$application = new Application();
|
||||||
$application->add(new \FooCommand());
|
$application->add(new \FooCommand());
|
||||||
@ -493,7 +493,7 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testLegacyAsXml()
|
public function testLegacyAsXml()
|
||||||
{
|
{
|
||||||
$this->iniSet('error_reporting', -1 & E_USER_DEPRECATED);
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
$application = new Application();
|
$application = new Application();
|
||||||
$application->add(new \FooCommand());
|
$application->add(new \FooCommand());
|
||||||
|
@ -320,7 +320,7 @@ class CommandTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testLegacyAsText()
|
public function testLegacyAsText()
|
||||||
{
|
{
|
||||||
$this->iniSet('error_reporting', -1 & E_USER_DEPRECATED);
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
$command = new \TestCommand();
|
$command = new \TestCommand();
|
||||||
$command->setApplication(new Application());
|
$command->setApplication(new Application());
|
||||||
@ -331,7 +331,7 @@ class CommandTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testLegacyAsXml()
|
public function testLegacyAsXml()
|
||||||
{
|
{
|
||||||
$this->iniSet('error_reporting', -1 & E_USER_DEPRECATED);
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
$command = new \TestCommand();
|
$command = new \TestCommand();
|
||||||
$command->setApplication(new Application());
|
$command->setApplication(new Application());
|
||||||
|
@ -375,7 +375,7 @@ class InputDefinitionTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testLegacyAsText()
|
public function testLegacyAsText()
|
||||||
{
|
{
|
||||||
$this->iniSet('error_reporting', -1 & E_USER_DEPRECATED);
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
$definition = new InputDefinition(array(
|
$definition = new InputDefinition(array(
|
||||||
new InputArgument('foo', InputArgument::OPTIONAL, 'The foo argument'),
|
new InputArgument('foo', InputArgument::OPTIONAL, 'The foo argument'),
|
||||||
@ -392,7 +392,7 @@ class InputDefinitionTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testLegacyAsXml()
|
public function testLegacyAsXml()
|
||||||
{
|
{
|
||||||
$this->iniSet('error_reporting', -1 & E_USER_DEPRECATED);
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
$definition = new InputDefinition(array(
|
$definition = new InputDefinition(array(
|
||||||
new InputArgument('foo', InputArgument::OPTIONAL, 'The foo argument'),
|
new InputArgument('foo', InputArgument::OPTIONAL, 'The foo argument'),
|
||||||
|
@ -43,7 +43,7 @@ class StringInputTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testLegacyInputOptionDefinitionInConstructor()
|
public function testLegacyInputOptionDefinitionInConstructor()
|
||||||
{
|
{
|
||||||
$this->iniSet('error_reporting', -1 & E_USER_DEPRECATED);
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
$definition = new InputDefinition(
|
$definition = new InputDefinition(
|
||||||
array(new InputOption('foo', null, InputOption::VALUE_REQUIRED))
|
array(new InputOption('foo', null, InputOption::VALUE_REQUIRED))
|
||||||
|
@ -20,7 +20,7 @@ class DeprecationErrorHandler
|
|||||||
{
|
{
|
||||||
public static function handle($errorNumber, $message, $file, $line, $context)
|
public static function handle($errorNumber, $message, $file, $line, $context)
|
||||||
{
|
{
|
||||||
if ($errorNumber & E_USER_DEPRECATED) {
|
if ($errorNumber & ~E_USER_DEPRECATED) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -29,7 +29,7 @@ class DeprecationErrorHandler
|
|||||||
|
|
||||||
public static function handleBC($errorNumber, $message, $file, $line, $context)
|
public static function handleBC($errorNumber, $message, $file, $line, $context)
|
||||||
{
|
{
|
||||||
if ($errorNumber & E_USER_DEPRECATED) {
|
if ($errorNumber & ~E_USER_DEPRECATED) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -163,7 +163,7 @@ abstract class AbstractChoiceListTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testLegacyGetIndicesForChoices()
|
public function testLegacyGetIndicesForChoices()
|
||||||
{
|
{
|
||||||
$this->iniSet('error_reporting', -1 & E_USER_DEPRECATED);
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
$choices = array($this->choice1, $this->choice2);
|
$choices = array($this->choice1, $this->choice2);
|
||||||
$this->assertSame(array($this->index1, $this->index2), $this->list->getIndicesForChoices($choices));
|
$this->assertSame(array($this->index1, $this->index2), $this->list->getIndicesForChoices($choices));
|
||||||
@ -171,7 +171,7 @@ abstract class AbstractChoiceListTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testLegacyGetIndicesForChoicesPreservesKeys()
|
public function testLegacyGetIndicesForChoicesPreservesKeys()
|
||||||
{
|
{
|
||||||
$this->iniSet('error_reporting', -1 & E_USER_DEPRECATED);
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
$choices = array(5 => $this->choice1, 8 => $this->choice2);
|
$choices = array(5 => $this->choice1, 8 => $this->choice2);
|
||||||
$this->assertSame(array(5 => $this->index1, 8 => $this->index2), $this->list->getIndicesForChoices($choices));
|
$this->assertSame(array(5 => $this->index1, 8 => $this->index2), $this->list->getIndicesForChoices($choices));
|
||||||
@ -179,7 +179,7 @@ abstract class AbstractChoiceListTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testLegacyGetIndicesForChoicesPreservesOrder()
|
public function testLegacyGetIndicesForChoicesPreservesOrder()
|
||||||
{
|
{
|
||||||
$this->iniSet('error_reporting', -1 & E_USER_DEPRECATED);
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
$choices = array($this->choice2, $this->choice1);
|
$choices = array($this->choice2, $this->choice1);
|
||||||
$this->assertSame(array($this->index2, $this->index1), $this->list->getIndicesForChoices($choices));
|
$this->assertSame(array($this->index2, $this->index1), $this->list->getIndicesForChoices($choices));
|
||||||
@ -187,7 +187,7 @@ abstract class AbstractChoiceListTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testLegacyGetIndicesForChoicesIgnoresNonExistingChoices()
|
public function testLegacyGetIndicesForChoicesIgnoresNonExistingChoices()
|
||||||
{
|
{
|
||||||
$this->iniSet('error_reporting', -1 & E_USER_DEPRECATED);
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
$choices = array($this->choice1, $this->choice2, 'foobar');
|
$choices = array($this->choice1, $this->choice2, 'foobar');
|
||||||
$this->assertSame(array($this->index1, $this->index2), $this->list->getIndicesForChoices($choices));
|
$this->assertSame(array($this->index1, $this->index2), $this->list->getIndicesForChoices($choices));
|
||||||
@ -195,14 +195,14 @@ abstract class AbstractChoiceListTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testLegacyGetIndicesForChoicesEmpty()
|
public function testLegacyGetIndicesForChoicesEmpty()
|
||||||
{
|
{
|
||||||
$this->iniSet('error_reporting', -1 & E_USER_DEPRECATED);
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
$this->assertSame(array(), $this->list->getIndicesForChoices(array()));
|
$this->assertSame(array(), $this->list->getIndicesForChoices(array()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testLegacyGetIndicesForValues()
|
public function testLegacyGetIndicesForValues()
|
||||||
{
|
{
|
||||||
$this->iniSet('error_reporting', -1 & E_USER_DEPRECATED);
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
// values and indices are always the same
|
// values and indices are always the same
|
||||||
$values = array($this->value1, $this->value2);
|
$values = array($this->value1, $this->value2);
|
||||||
@ -211,7 +211,7 @@ abstract class AbstractChoiceListTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testLegacyGetIndicesForValuesPreservesKeys()
|
public function testLegacyGetIndicesForValuesPreservesKeys()
|
||||||
{
|
{
|
||||||
$this->iniSet('error_reporting', -1 & E_USER_DEPRECATED);
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
// values and indices are always the same
|
// values and indices are always the same
|
||||||
$values = array(5 => $this->value1, 8 => $this->value2);
|
$values = array(5 => $this->value1, 8 => $this->value2);
|
||||||
@ -220,7 +220,7 @@ abstract class AbstractChoiceListTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testLegacyGetIndicesForValuesPreservesOrder()
|
public function testLegacyGetIndicesForValuesPreservesOrder()
|
||||||
{
|
{
|
||||||
$this->iniSet('error_reporting', -1 & E_USER_DEPRECATED);
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
$values = array($this->value2, $this->value1);
|
$values = array($this->value2, $this->value1);
|
||||||
$this->assertSame(array($this->index2, $this->index1), $this->list->getIndicesForValues($values));
|
$this->assertSame(array($this->index2, $this->index1), $this->list->getIndicesForValues($values));
|
||||||
@ -228,7 +228,7 @@ abstract class AbstractChoiceListTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testLegacyGetIndicesForValuesIgnoresNonExistingValues()
|
public function testLegacyGetIndicesForValuesIgnoresNonExistingValues()
|
||||||
{
|
{
|
||||||
$this->iniSet('error_reporting', -1 & E_USER_DEPRECATED);
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
$values = array($this->value1, $this->value2, 'foobar');
|
$values = array($this->value1, $this->value2, 'foobar');
|
||||||
$this->assertSame(array($this->index1, $this->index2), $this->list->getIndicesForValues($values));
|
$this->assertSame(array($this->index1, $this->index2), $this->list->getIndicesForValues($values));
|
||||||
@ -236,7 +236,7 @@ abstract class AbstractChoiceListTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testLegacyGetIndicesForValuesEmpty()
|
public function testLegacyGetIndicesForValuesEmpty()
|
||||||
{
|
{
|
||||||
$this->iniSet('error_reporting', -1 & E_USER_DEPRECATED);
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
$this->assertSame(array(), $this->list->getIndicesForValues(array()));
|
$this->assertSame(array(), $this->list->getIndicesForValues(array()));
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ class LazyChoiceListTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testLegacyGetIndicesForChoices()
|
public function testLegacyGetIndicesForChoices()
|
||||||
{
|
{
|
||||||
$this->iniSet('error_reporting', -1 & E_USER_DEPRECATED);
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
$choices = array('b', 'c');
|
$choices = array('b', 'c');
|
||||||
$this->assertSame(array(1, 2), $this->list->getIndicesForChoices($choices));
|
$this->assertSame(array(1, 2), $this->list->getIndicesForChoices($choices));
|
||||||
@ -67,7 +67,7 @@ class LazyChoiceListTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testLegacyGetIndicesForValues()
|
public function testLegacyGetIndicesForValues()
|
||||||
{
|
{
|
||||||
$this->iniSet('error_reporting', -1 & E_USER_DEPRECATED);
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
$values = array('b', 'c');
|
$values = array('b', 'c');
|
||||||
$this->assertSame(array(1, 2), $this->list->getIndicesForValues($values));
|
$this->assertSame(array(1, 2), $this->list->getIndicesForValues($values));
|
||||||
|
@ -187,7 +187,7 @@ class ObjectChoiceListTest extends AbstractChoiceListTest
|
|||||||
|
|
||||||
public function testLegacyGetIndicesForChoicesWithValuePath()
|
public function testLegacyGetIndicesForChoicesWithValuePath()
|
||||||
{
|
{
|
||||||
$this->iniSet('error_reporting', -1 & E_USER_DEPRECATED);
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
$this->list = new ObjectChoiceList(
|
$this->list = new ObjectChoiceList(
|
||||||
array($this->obj1, $this->obj2, $this->obj3, $this->obj4),
|
array($this->obj1, $this->obj2, $this->obj3, $this->obj4),
|
||||||
@ -204,7 +204,7 @@ class ObjectChoiceListTest extends AbstractChoiceListTest
|
|||||||
|
|
||||||
public function testLegacyGetIndicesForChoicesWithValuePathPreservesKeys()
|
public function testLegacyGetIndicesForChoicesWithValuePathPreservesKeys()
|
||||||
{
|
{
|
||||||
$this->iniSet('error_reporting', -1 & E_USER_DEPRECATED);
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
$this->list = new ObjectChoiceList(
|
$this->list = new ObjectChoiceList(
|
||||||
array($this->obj1, $this->obj2, $this->obj3, $this->obj4),
|
array($this->obj1, $this->obj2, $this->obj3, $this->obj4),
|
||||||
@ -220,7 +220,7 @@ class ObjectChoiceListTest extends AbstractChoiceListTest
|
|||||||
|
|
||||||
public function testLegacyGetIndicesForChoicesWithValuePathPreservesOrder()
|
public function testLegacyGetIndicesForChoicesWithValuePathPreservesOrder()
|
||||||
{
|
{
|
||||||
$this->iniSet('error_reporting', -1 & E_USER_DEPRECATED);
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
$this->list = new ObjectChoiceList(
|
$this->list = new ObjectChoiceList(
|
||||||
array($this->obj1, $this->obj2, $this->obj3, $this->obj4),
|
array($this->obj1, $this->obj2, $this->obj3, $this->obj4),
|
||||||
@ -236,7 +236,7 @@ class ObjectChoiceListTest extends AbstractChoiceListTest
|
|||||||
|
|
||||||
public function testLegacyGetIndicesForChoicesWithValuePathIgnoresNonExistingChoices()
|
public function testLegacyGetIndicesForChoicesWithValuePathIgnoresNonExistingChoices()
|
||||||
{
|
{
|
||||||
$this->iniSet('error_reporting', -1 & E_USER_DEPRECATED);
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
$this->list = new ObjectChoiceList(
|
$this->list = new ObjectChoiceList(
|
||||||
array($this->obj1, $this->obj2, $this->obj3, $this->obj4),
|
array($this->obj1, $this->obj2, $this->obj3, $this->obj4),
|
||||||
|
@ -17,7 +17,7 @@ class SimpleNumericChoiceListTest extends AbstractChoiceListTest
|
|||||||
{
|
{
|
||||||
public function testLegacyGetIndicesForChoicesDealsWithNumericChoices()
|
public function testLegacyGetIndicesForChoicesDealsWithNumericChoices()
|
||||||
{
|
{
|
||||||
$this->iniSet('error_reporting', -1 & E_USER_DEPRECATED);
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
// Pass choices as strings although they are integers
|
// Pass choices as strings although they are integers
|
||||||
$choices = array('0', '1');
|
$choices = array('0', '1');
|
||||||
@ -26,7 +26,7 @@ class SimpleNumericChoiceListTest extends AbstractChoiceListTest
|
|||||||
|
|
||||||
public function testLegacyGetIndicesForValuesDealsWithNumericValues()
|
public function testLegacyGetIndicesForValuesDealsWithNumericValues()
|
||||||
{
|
{
|
||||||
$this->iniSet('error_reporting', -1 & E_USER_DEPRECATED);
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
// Pass values as strings although they are integers
|
// Pass values as strings although they are integers
|
||||||
$values = array('0', '1');
|
$values = array('0', '1');
|
||||||
|
@ -598,7 +598,20 @@ class FormValidatorTest extends AbstractConstraintValidatorTest
|
|||||||
|
|
||||||
private function getMockExecutionContext()
|
private function getMockExecutionContext()
|
||||||
{
|
{
|
||||||
return $this->getMock('Symfony\Component\Validator\Context\ExecutionContextInterface');
|
$context = $this->getMock('Symfony\Component\Validator\Context\ExecutionContextInterface');
|
||||||
|
$validator = $this->getMock('Symfony\Component\Validator\Validator\ValidatorInterface');
|
||||||
|
$contextualValidator = $this->getMock('Symfony\Component\Validator\Validator\ContextualValidatorInterface');
|
||||||
|
|
||||||
|
$validator->expects($this->any())
|
||||||
|
->method('inContext')
|
||||||
|
->with($context)
|
||||||
|
->will($this->returnValue($contextualValidator));
|
||||||
|
|
||||||
|
$context->expects($this->any())
|
||||||
|
->method('getValidator')
|
||||||
|
->will($this->returnValue($validator));
|
||||||
|
|
||||||
|
return $context;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -17,7 +17,7 @@ use Symfony\Component\Validator\Validation;
|
|||||||
* @since 2.5.4
|
* @since 2.5.4
|
||||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||||
*/
|
*/
|
||||||
class LegacyUserPasswordValidatorLegacyApiTest extends UserPasswordValidatorTest
|
class LegacyUserPasswordValidatorApiTest extends UserPasswordValidatorTest
|
||||||
{
|
{
|
||||||
protected function getApiVersion()
|
protected function getApiVersion()
|
||||||
{
|
{
|
@ -26,7 +26,7 @@ class LoaderTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testLegacyGetSetDebugger()
|
public function testLegacyGetSetDebugger()
|
||||||
{
|
{
|
||||||
$this->iniSet('error_reporting', -1 & E_USER_DEPRECATED);
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
$loader = new ProjectTemplateLoader4();
|
$loader = new ProjectTemplateLoader4();
|
||||||
$debugger = $this->getMock('Symfony\Component\Templating\DebuggerInterface');
|
$debugger = $this->getMock('Symfony\Component\Templating\DebuggerInterface');
|
||||||
|
@ -53,6 +53,7 @@ class TraversalStrategy
|
|||||||
*
|
*
|
||||||
* @deprecated This constant was added for backwards compatibility only.
|
* @deprecated This constant was added for backwards compatibility only.
|
||||||
* It will be removed in Symfony 3.0.
|
* It will be removed in Symfony 3.0.
|
||||||
|
* @internal
|
||||||
*/
|
*/
|
||||||
const STOP_RECURSION = 8;
|
const STOP_RECURSION = 8;
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ abstract class AbstractConstraintValidatorTest extends \PHPUnit_Framework_TestCa
|
|||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
if (Validation::API_VERSION_2_5 !== $this->getApiVersion()) {
|
if (Validation::API_VERSION_2_5 !== $this->getApiVersion()) {
|
||||||
$this->iniSet('error_reporting', -1 & E_USER_DEPRECATED);
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->group = 'MyGroup';
|
$this->group = 'MyGroup';
|
||||||
|
@ -38,7 +38,7 @@ class LegacyExecutionContextTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
$this->iniSet('error_reporting', -1 & E_USER_DEPRECATED);
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
$this->visitor = $this->getMockBuilder('Symfony\Component\Validator\ValidationVisitor')
|
$this->visitor = $this->getMockBuilder('Symfony\Component\Validator\ValidationVisitor')
|
||||||
->disableOriginalConstructor()
|
->disableOriginalConstructor()
|
||||||
|
@ -17,7 +17,7 @@ class LegacyApcCacheTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
$this->iniSet('error_reporting', -1 & E_USER_DEPRECATED);
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
if (!extension_loaded('apc') || !ini_get('apc.enable_cli')) {
|
if (!extension_loaded('apc') || !ini_get('apc.enable_cli')) {
|
||||||
$this->markTestSkipped('APC is not loaded.');
|
$this->markTestSkipped('APC is not loaded.');
|
||||||
|
@ -21,7 +21,7 @@ class LegacyElementMetadataTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
$this->iniSet('error_reporting', -1 & E_USER_DEPRECATED);
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
$this->metadata = new TestElementMetadata();
|
$this->metadata = new TestElementMetadata();
|
||||||
}
|
}
|
||||||
|
@ -636,7 +636,7 @@ abstract class Abstract2Dot5ApiTest extends AbstractValidatorTest
|
|||||||
*/
|
*/
|
||||||
public function testLegacyPropertyMetadataMustImplementPropertyMetadataInterface()
|
public function testLegacyPropertyMetadataMustImplementPropertyMetadataInterface()
|
||||||
{
|
{
|
||||||
$this->iniSet('error_reporting', -1 & E_USER_DEPRECATED);
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
$entity = new Entity();
|
$entity = new Entity();
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ abstract class AbstractLegacyApiTest extends AbstractValidatorTest
|
|||||||
|
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
$this->iniSet('error_reporting', -1 & E_USER_DEPRECATED);
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
|
@ -843,7 +843,7 @@ abstract class AbstractValidatorTest extends \PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
public function testLegacyValidatePropertyFailsIfPropertiesNotSupported()
|
public function testLegacyValidatePropertyFailsIfPropertiesNotSupported()
|
||||||
{
|
{
|
||||||
$this->iniSet('error_reporting', -1 & E_USER_DEPRECATED);
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
// $metadata does not implement PropertyMetadataContainerInterface
|
// $metadata does not implement PropertyMetadataContainerInterface
|
||||||
$metadata = $this->getMock('Symfony\Component\Validator\MetadataInterface');
|
$metadata = $this->getMock('Symfony\Component\Validator\MetadataInterface');
|
||||||
@ -975,7 +975,7 @@ abstract class AbstractValidatorTest extends \PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
public function testLegacyValidatePropertyValueFailsIfPropertiesNotSupported()
|
public function testLegacyValidatePropertyValueFailsIfPropertiesNotSupported()
|
||||||
{
|
{
|
||||||
$this->iniSet('error_reporting', -1 & E_USER_DEPRECATED);
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
// $metadata does not implement PropertyMetadataContainerInterface
|
// $metadata does not implement PropertyMetadataContainerInterface
|
||||||
$metadata = $this->getMock('Symfony\Component\Validator\MetadataInterface');
|
$metadata = $this->getMock('Symfony\Component\Validator\MetadataInterface');
|
||||||
|
@ -112,7 +112,7 @@ class ValidatorBuilderTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testLegacyDefaultApiVersion()
|
public function testLegacyDefaultApiVersion()
|
||||||
{
|
{
|
||||||
$this->iniSet('error_reporting', -1 & E_USER_DEPRECATED);
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
if (PHP_VERSION_ID < 50309) {
|
if (PHP_VERSION_ID < 50309) {
|
||||||
// Old implementation on PHP < 5.3.9
|
// Old implementation on PHP < 5.3.9
|
||||||
@ -125,7 +125,7 @@ class ValidatorBuilderTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testLegacySetApiVersion24()
|
public function testLegacySetApiVersion24()
|
||||||
{
|
{
|
||||||
$this->iniSet('error_reporting', -1 & E_USER_DEPRECATED);
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
$this->assertSame($this->builder, $this->builder->setApiVersion(Validation::API_VERSION_2_4));
|
$this->assertSame($this->builder, $this->builder->setApiVersion(Validation::API_VERSION_2_4));
|
||||||
$this->assertInstanceOf('Symfony\Component\Validator\Validator', $this->builder->getValidator());
|
$this->assertInstanceOf('Symfony\Component\Validator\Validator', $this->builder->getValidator());
|
||||||
@ -139,7 +139,7 @@ class ValidatorBuilderTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testLegacySetApiVersion24And25()
|
public function testLegacySetApiVersion24And25()
|
||||||
{
|
{
|
||||||
$this->iniSet('error_reporting', -1 & E_USER_DEPRECATED);
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
if (PHP_VERSION_ID < 50309) {
|
if (PHP_VERSION_ID < 50309) {
|
||||||
$this->markTestSkipped('Not supported prior to PHP 5.3.9');
|
$this->markTestSkipped('Not supported prior to PHP 5.3.9');
|
||||||
|
Reference in New Issue
Block a user