You are here

public function RecursiveValidator2Dot5ApiTest::testEmptyGroupsArrayDoesNotTriggerDeprecation in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/validator/Tests/Validator/RecursiveValidator2Dot5ApiTest.php \Symfony\Component\Validator\Tests\Validator\RecursiveValidator2Dot5ApiTest::testEmptyGroupsArrayDoesNotTriggerDeprecation()

File

vendor/symfony/validator/Tests/Validator/RecursiveValidator2Dot5ApiTest.php, line 34

Class

RecursiveValidator2Dot5ApiTest

Namespace

Symfony\Component\Validator\Tests\Validator

Code

public function testEmptyGroupsArrayDoesNotTriggerDeprecation() {
  $entity = new Entity();
  $validatorContext = $this
    ->getMock('Symfony\\Component\\Validator\\Validator\\ContextualValidatorInterface');
  $validatorContext
    ->expects($this
    ->once())
    ->method('validate')
    ->with($entity, null, array())
    ->willReturnSelf();
  $validator = $this
    ->getMockBuilder('Symfony\\Component\\Validator\\Validator\\RecursiveValidator')
    ->disableOriginalConstructor()
    ->setMethods(array(
    'startContext',
  ))
    ->getMock();
  $validator
    ->expects($this
    ->once())
    ->method('startContext')
    ->willReturn($validatorContext);
  $validator
    ->validate($entity, null, array());
}