CS: adjust chaining indentation

This commit is contained in:
Dariusz 2017-05-31 11:30:46 +02:00
parent aa04f35092
commit 8c3c0fe65e
17 changed files with 110 additions and 110 deletions

View File

@ -142,13 +142,13 @@ class DoctrineDataCollectorTest extends TestCase
$registry = $this->getMockBuilder('Doctrine\Common\Persistence\ManagerRegistry')->getMock(); $registry = $this->getMockBuilder('Doctrine\Common\Persistence\ManagerRegistry')->getMock();
$registry $registry
->expects($this->any()) ->expects($this->any())
->method('getConnectionNames') ->method('getConnectionNames')
->will($this->returnValue(array('default' => 'doctrine.dbal.default_connection'))); ->will($this->returnValue(array('default' => 'doctrine.dbal.default_connection')));
$registry $registry
->expects($this->any()) ->expects($this->any())
->method('getManagerNames') ->method('getManagerNames')
->will($this->returnValue(array('default' => 'doctrine.orm.default_entity_manager'))); ->will($this->returnValue(array('default' => 'doctrine.orm.default_entity_manager')));
$registry->expects($this->any()) $registry->expects($this->any())
->method('getConnection') ->method('getConnection')
->will($this->returnValue($connection)); ->will($this->returnValue($connection));

View File

@ -89,8 +89,8 @@ class UniqueEntityValidatorTest extends AbstractConstraintValidatorTest
->getMock() ->getMock()
; ;
$em->expects($this->any()) $em->expects($this->any())
->method('getRepository') ->method('getRepository')
->will($this->returnValue($repositoryMock)) ->will($this->returnValue($repositoryMock))
; ;
$classMetadata = $this->getMockBuilder('Doctrine\Common\Persistence\Mapping\ClassMetadata')->getMock(); $classMetadata = $this->getMockBuilder('Doctrine\Common\Persistence\Mapping\ClassMetadata')->getMock();
@ -115,8 +115,8 @@ class UniqueEntityValidatorTest extends AbstractConstraintValidatorTest
; ;
$classMetadata->reflFields = array('name' => $refl); $classMetadata->reflFields = array('name' => $refl);
$em->expects($this->any()) $em->expects($this->any())
->method('getClassMetadata') ->method('getClassMetadata')
->will($this->returnValue($classMetadata)) ->will($this->returnValue($classMetadata))
; ;
return $em; return $em;
@ -333,8 +333,8 @@ class UniqueEntityValidatorTest extends AbstractConstraintValidatorTest
$repository = $this->createRepositoryMock(); $repository = $this->createRepositoryMock();
$repository->expects($this->once()) $repository->expects($this->once())
->method('findByCustom') ->method('findByCustom')
->will($this->returnValue(array())) ->will($this->returnValue(array()))
; ;
$this->em = $this->createEntityManagerMock($repository); $this->em = $this->createEntityManagerMock($repository);
$this->registry = $this->createRegistryMock($this->em); $this->registry = $this->createRegistryMock($this->em);

View File

@ -72,8 +72,8 @@ class RouterDebugCommandTest extends TestCase
; ;
$loader = $this->getMockBuilder('Symfony\Bundle\FrameworkBundle\Routing\DelegatingLoader') $loader = $this->getMockBuilder('Symfony\Bundle\FrameworkBundle\Routing\DelegatingLoader')
->disableOriginalConstructor() ->disableOriginalConstructor()
->getMock(); ->getMock();
$container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock();
$container $container

View File

@ -76,8 +76,8 @@ class RouterMatchCommandTest extends TestCase
; ;
$loader = $this->getMockBuilder('Symfony\Bundle\FrameworkBundle\Routing\DelegatingLoader') $loader = $this->getMockBuilder('Symfony\Bundle\FrameworkBundle\Routing\DelegatingLoader')
->disableOriginalConstructor() ->disableOriginalConstructor()
->getMock(); ->getMock();
$container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock(); $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock();
$container $container

View File

@ -735,8 +735,8 @@ class ApplicationTest extends TestCase
$application = $this->getMockBuilder('Symfony\Component\Console\Application')->setMethods(array('doRun'))->getMock(); $application = $this->getMockBuilder('Symfony\Component\Console\Application')->setMethods(array('doRun'))->getMock();
$application->setAutoExit(false); $application->setAutoExit(false);
$application->expects($this->once()) $application->expects($this->once())
->method('doRun') ->method('doRun')
->will($this->throwException($exception)); ->will($this->throwException($exception));
$exitCode = $application->run(new ArrayInput(array()), new NullOutput()); $exitCode = $application->run(new ArrayInput(array()), new NullOutput());
@ -750,8 +750,8 @@ class ApplicationTest extends TestCase
$application = $this->getMockBuilder('Symfony\Component\Console\Application')->setMethods(array('doRun'))->getMock(); $application = $this->getMockBuilder('Symfony\Component\Console\Application')->setMethods(array('doRun'))->getMock();
$application->setAutoExit(false); $application->setAutoExit(false);
$application->expects($this->once()) $application->expects($this->once())
->method('doRun') ->method('doRun')
->will($this->throwException($exception)); ->will($this->throwException($exception));
$exitCode = $application->run(new ArrayInput(array()), new NullOutput()); $exitCode = $application->run(new ArrayInput(array()), new NullOutput());

View File

@ -25,7 +25,7 @@ class AutoAliasServicePassTest extends TestCase
$container = new ContainerBuilder(); $container = new ContainerBuilder();
$container->register('example') $container->register('example')
->addTag('auto_alias', array('format' => '%non_existing%.example')); ->addTag('auto_alias', array('format' => '%non_existing%.example'));
$pass = new AutoAliasServicePass(); $pass = new AutoAliasServicePass();
$pass->process($container); $pass->process($container);
@ -39,7 +39,7 @@ class AutoAliasServicePassTest extends TestCase
$container = new ContainerBuilder(); $container = new ContainerBuilder();
$container->register('example') $container->register('example')
->addTag('auto_alias', array()); ->addTag('auto_alias', array());
$container->setParameter('existing', 'mysql'); $container->setParameter('existing', 'mysql');
$pass = new AutoAliasServicePass(); $pass = new AutoAliasServicePass();
@ -51,7 +51,7 @@ class AutoAliasServicePassTest extends TestCase
$container = new ContainerBuilder(); $container = new ContainerBuilder();
$container->register('example', 'Symfony\Component\DependencyInjection\Tests\Compiler\ServiceClassDefault') $container->register('example', 'Symfony\Component\DependencyInjection\Tests\Compiler\ServiceClassDefault')
->addTag('auto_alias', array('format' => '%existing%.example')); ->addTag('auto_alias', array('format' => '%existing%.example'));
$container->setParameter('existing', 'mysql'); $container->setParameter('existing', 'mysql');
$pass = new AutoAliasServicePass(); $pass = new AutoAliasServicePass();
@ -66,7 +66,7 @@ class AutoAliasServicePassTest extends TestCase
$container = new ContainerBuilder(); $container = new ContainerBuilder();
$container->register('example', 'Symfony\Component\DependencyInjection\Tests\Compiler\ServiceClassDefault') $container->register('example', 'Symfony\Component\DependencyInjection\Tests\Compiler\ServiceClassDefault')
->addTag('auto_alias', array('format' => '%existing%.example')); ->addTag('auto_alias', array('format' => '%existing%.example'));
$container->register('mysql.example', 'Symfony\Component\DependencyInjection\Tests\Compiler\ServiceClassMysql'); $container->register('mysql.example', 'Symfony\Component\DependencyInjection\Tests\Compiler\ServiceClassMysql');
$container->setParameter('existing', 'mysql'); $container->setParameter('existing', 'mysql');
@ -84,7 +84,7 @@ class AutoAliasServicePassTest extends TestCase
$container = new ContainerBuilder(); $container = new ContainerBuilder();
$container->register('example', 'Symfony\Component\DependencyInjection\Tests\Compiler\ServiceClassDefault') $container->register('example', 'Symfony\Component\DependencyInjection\Tests\Compiler\ServiceClassDefault')
->addTag('auto_alias', array('format' => '%existing%.example')); ->addTag('auto_alias', array('format' => '%existing%.example'));
$container->register('mysql.example', 'Symfony\Component\DependencyInjection\Tests\Compiler\ServiceClassMysql'); $container->register('mysql.example', 'Symfony\Component\DependencyInjection\Tests\Compiler\ServiceClassMysql');
$container->register('mariadb.example', 'Symfony\Component\DependencyInjection\Tests\Compiler\ServiceClassMariadb'); $container->register('mariadb.example', 'Symfony\Component\DependencyInjection\Tests\Compiler\ServiceClassMariadb');

View File

@ -346,8 +346,8 @@ abstract class AbstractDivLayoutTest extends AbstractLayoutTest
); );
$form = $this->factory->createNamedBuilder('form', 'form') $form = $this->factory->createNamedBuilder('form', 'form')
->add($collection) ->add($collection)
->getForm(); ->getForm();
$this->assertWidgetMatchesXpath($form->createView(), array(), $this->assertWidgetMatchesXpath($form->createView(), array(),
'/div '/div

View File

@ -20,14 +20,14 @@ class DataTransformerChainTest extends TestCase
{ {
$transformer1 = $this->getMockBuilder('Symfony\Component\Form\DataTransformerInterface')->getMock(); $transformer1 = $this->getMockBuilder('Symfony\Component\Form\DataTransformerInterface')->getMock();
$transformer1->expects($this->once()) $transformer1->expects($this->once())
->method('transform') ->method('transform')
->with($this->identicalTo('foo')) ->with($this->identicalTo('foo'))
->will($this->returnValue('bar')); ->will($this->returnValue('bar'));
$transformer2 = $this->getMockBuilder('Symfony\Component\Form\DataTransformerInterface')->getMock(); $transformer2 = $this->getMockBuilder('Symfony\Component\Form\DataTransformerInterface')->getMock();
$transformer2->expects($this->once()) $transformer2->expects($this->once())
->method('transform') ->method('transform')
->with($this->identicalTo('bar')) ->with($this->identicalTo('bar'))
->will($this->returnValue('baz')); ->will($this->returnValue('baz'));
$chain = new DataTransformerChain(array($transformer1, $transformer2)); $chain = new DataTransformerChain(array($transformer1, $transformer2));
@ -38,14 +38,14 @@ class DataTransformerChainTest extends TestCase
{ {
$transformer2 = $this->getMockBuilder('Symfony\Component\Form\DataTransformerInterface')->getMock(); $transformer2 = $this->getMockBuilder('Symfony\Component\Form\DataTransformerInterface')->getMock();
$transformer2->expects($this->once()) $transformer2->expects($this->once())
->method('reverseTransform') ->method('reverseTransform')
->with($this->identicalTo('foo')) ->with($this->identicalTo('foo'))
->will($this->returnValue('bar')); ->will($this->returnValue('bar'));
$transformer1 = $this->getMockBuilder('Symfony\Component\Form\DataTransformerInterface')->getMock(); $transformer1 = $this->getMockBuilder('Symfony\Component\Form\DataTransformerInterface')->getMock();
$transformer1->expects($this->once()) $transformer1->expects($this->once())
->method('reverseTransform') ->method('reverseTransform')
->with($this->identicalTo('bar')) ->with($this->identicalTo('bar'))
->will($this->returnValue('baz')); ->will($this->returnValue('baz'));
$chain = new DataTransformerChain(array($transformer1, $transformer2)); $chain = new DataTransformerChain(array($transformer1, $transformer2));

View File

@ -124,9 +124,9 @@ class FormTypeTest extends BaseTypeTest
public function testNonReadOnlyFormWithNonReadOnlyParentIsNotReadOnly() public function testNonReadOnlyFormWithNonReadOnlyParentIsNotReadOnly()
{ {
$view = $this->factory->createNamedBuilder('parent', static::TESTED_TYPE) $view = $this->factory->createNamedBuilder('parent', static::TESTED_TYPE)
->add('child', static::TESTED_TYPE) ->add('child', static::TESTED_TYPE)
->getForm() ->getForm()
->createView(); ->createView();
$this->assertFalse($view['child']->vars['read_only']); $this->assertFalse($view['child']->vars['read_only']);
} }
@ -478,9 +478,9 @@ class FormTypeTest extends BaseTypeTest
public function testViewIsNotRenderedByDefault() public function testViewIsNotRenderedByDefault()
{ {
$view = $this->factory->createBuilder(static::TESTED_TYPE) $view = $this->factory->createBuilder(static::TESTED_TYPE)
->add('foo', static::TESTED_TYPE) ->add('foo', static::TESTED_TYPE)
->getForm() ->getForm()
->createView(); ->createView();
$this->assertFalse($view->isRendered()); $this->assertFalse($view->isRendered());
} }

View File

@ -37,8 +37,8 @@ class LegacySessionCsrfProviderTest extends TestCase
public function testGenerateCsrfToken() public function testGenerateCsrfToken()
{ {
$this->session->expects($this->once()) $this->session->expects($this->once())
->method('getId') ->method('getId')
->will($this->returnValue('ABCDEF')); ->will($this->returnValue('ABCDEF'));
$token = $this->provider->generateCsrfToken('foo'); $token = $this->provider->generateCsrfToken('foo');
@ -48,8 +48,8 @@ class LegacySessionCsrfProviderTest extends TestCase
public function testIsCsrfTokenValidSucceeds() public function testIsCsrfTokenValidSucceeds()
{ {
$this->session->expects($this->once()) $this->session->expects($this->once())
->method('getId') ->method('getId')
->will($this->returnValue('ABCDEF')); ->will($this->returnValue('ABCDEF'));
$token = sha1('SECRET'.'foo'.'ABCDEF'); $token = sha1('SECRET'.'foo'.'ABCDEF');
@ -59,8 +59,8 @@ class LegacySessionCsrfProviderTest extends TestCase
public function testIsCsrfTokenValidFails() public function testIsCsrfTokenValidFails()
{ {
$this->session->expects($this->once()) $this->session->expects($this->once())
->method('getId') ->method('getId')
->will($this->returnValue('ABCDEF')); ->will($this->returnValue('ABCDEF'));
$token = sha1('SECRET'.'bar'.'ABCDEF'); $token = sha1('SECRET'.'bar'.'ABCDEF');

View File

@ -427,9 +427,9 @@ class FormFactoryTest extends TestCase
public function testCreateBuilderCreatesTextFormIfNoGuess() public function testCreateBuilderCreatesTextFormIfNoGuess()
{ {
$this->guesser1->expects($this->once()) $this->guesser1->expects($this->once())
->method('guessType') ->method('guessType')
->with('Application\Author', 'firstName') ->with('Application\Author', 'firstName')
->will($this->returnValue(null)); ->will($this->returnValue(null));
$factory = $this->getMockFactory(array('createNamedBuilder')); $factory = $this->getMockFactory(array('createNamedBuilder'));
@ -446,9 +446,9 @@ class FormFactoryTest extends TestCase
public function testOptionsCanBeOverridden() public function testOptionsCanBeOverridden()
{ {
$this->guesser1->expects($this->once()) $this->guesser1->expects($this->once())
->method('guessType') ->method('guessType')
->with('Application\Author', 'firstName') ->with('Application\Author', 'firstName')
->will($this->returnValue(new TypeGuess( ->will($this->returnValue(new TypeGuess(
'text', 'text',
array('attr' => array('maxlength' => 10)), array('attr' => array('maxlength' => 10)),
Guess::MEDIUM_CONFIDENCE Guess::MEDIUM_CONFIDENCE
@ -474,17 +474,17 @@ class FormFactoryTest extends TestCase
public function testCreateBuilderUsesMaxLengthIfFound() public function testCreateBuilderUsesMaxLengthIfFound()
{ {
$this->guesser1->expects($this->once()) $this->guesser1->expects($this->once())
->method('guessMaxLength') ->method('guessMaxLength')
->with('Application\Author', 'firstName') ->with('Application\Author', 'firstName')
->will($this->returnValue(new ValueGuess( ->will($this->returnValue(new ValueGuess(
15, 15,
Guess::MEDIUM_CONFIDENCE Guess::MEDIUM_CONFIDENCE
))); )));
$this->guesser2->expects($this->once()) $this->guesser2->expects($this->once())
->method('guessMaxLength') ->method('guessMaxLength')
->with('Application\Author', 'firstName') ->with('Application\Author', 'firstName')
->will($this->returnValue(new ValueGuess( ->will($this->returnValue(new ValueGuess(
20, 20,
Guess::HIGH_CONFIDENCE Guess::HIGH_CONFIDENCE
))); )));
@ -542,17 +542,17 @@ class FormFactoryTest extends TestCase
public function testCreateBuilderUsesRequiredSettingWithHighestConfidence() public function testCreateBuilderUsesRequiredSettingWithHighestConfidence()
{ {
$this->guesser1->expects($this->once()) $this->guesser1->expects($this->once())
->method('guessRequired') ->method('guessRequired')
->with('Application\Author', 'firstName') ->with('Application\Author', 'firstName')
->will($this->returnValue(new ValueGuess( ->will($this->returnValue(new ValueGuess(
true, true,
Guess::MEDIUM_CONFIDENCE Guess::MEDIUM_CONFIDENCE
))); )));
$this->guesser2->expects($this->once()) $this->guesser2->expects($this->once())
->method('guessRequired') ->method('guessRequired')
->with('Application\Author', 'firstName') ->with('Application\Author', 'firstName')
->will($this->returnValue(new ValueGuess( ->will($this->returnValue(new ValueGuess(
false, false,
Guess::HIGH_CONFIDENCE Guess::HIGH_CONFIDENCE
))); )));
@ -575,17 +575,17 @@ class FormFactoryTest extends TestCase
public function testCreateBuilderUsesPatternIfFound() public function testCreateBuilderUsesPatternIfFound()
{ {
$this->guesser1->expects($this->once()) $this->guesser1->expects($this->once())
->method('guessPattern') ->method('guessPattern')
->with('Application\Author', 'firstName') ->with('Application\Author', 'firstName')
->will($this->returnValue(new ValueGuess( ->will($this->returnValue(new ValueGuess(
'[a-z]', '[a-z]',
Guess::MEDIUM_CONFIDENCE Guess::MEDIUM_CONFIDENCE
))); )));
$this->guesser2->expects($this->once()) $this->guesser2->expects($this->once())
->method('guessPattern') ->method('guessPattern')
->with('Application\Author', 'firstName') ->with('Application\Author', 'firstName')
->will($this->returnValue(new ValueGuess( ->will($this->returnValue(new ValueGuess(
'[a-zA-Z]', '[a-zA-Z]',
Guess::HIGH_CONFIDENCE Guess::HIGH_CONFIDENCE
))); )));

View File

@ -33,14 +33,14 @@ class RouterListenerTest extends TestCase
public function testPort($defaultHttpPort, $defaultHttpsPort, $uri, $expectedHttpPort, $expectedHttpsPort) public function testPort($defaultHttpPort, $defaultHttpsPort, $uri, $expectedHttpPort, $expectedHttpsPort)
{ {
$urlMatcher = $this->getMockBuilder('Symfony\Component\Routing\Matcher\UrlMatcherInterface') $urlMatcher = $this->getMockBuilder('Symfony\Component\Routing\Matcher\UrlMatcherInterface')
->disableOriginalConstructor() ->disableOriginalConstructor()
->getMock(); ->getMock();
$context = new RequestContext(); $context = new RequestContext();
$context->setHttpPort($defaultHttpPort); $context->setHttpPort($defaultHttpPort);
$context->setHttpsPort($defaultHttpsPort); $context->setHttpsPort($defaultHttpsPort);
$urlMatcher->expects($this->any()) $urlMatcher->expects($this->any())
->method('getContext') ->method('getContext')
->will($this->returnValue($context)); ->will($this->returnValue($context));
$listener = new RouterListener($urlMatcher, null, null, $this->requestStack); $listener = new RouterListener($urlMatcher, null, null, $this->requestStack);
$event = $this->createGetResponseEventForUri($uri); $event = $this->createGetResponseEventForUri($uri);
@ -133,13 +133,13 @@ class RouterListenerTest extends TestCase
{ {
$requestMatcher = $this->getMockBuilder('Symfony\Component\Routing\Matcher\RequestMatcherInterface')->getMock(); $requestMatcher = $this->getMockBuilder('Symfony\Component\Routing\Matcher\RequestMatcherInterface')->getMock();
$requestMatcher->expects($this->once()) $requestMatcher->expects($this->once())
->method('matchRequest') ->method('matchRequest')
->will($this->returnValue($parameter)); ->will($this->returnValue($parameter));
$logger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock(); $logger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock();
$logger->expects($this->once()) $logger->expects($this->once())
->method('info') ->method('info')
->with($this->equalTo($log)); ->with($this->equalTo($log));
$kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(); $kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock();
$request = Request::create('http://localhost/'); $request = Request::create('http://localhost/');

View File

@ -31,8 +31,8 @@ class AuditLoggerTest extends TestCase
; ;
$ace $ace
->expects($this->never()) ->expects($this->never())
->method('isAuditFailure') ->method('isAuditFailure')
; ;
} else { } else {
$ace $ace
@ -49,9 +49,9 @@ class AuditLoggerTest extends TestCase
if (true === $audit) { if (true === $audit) {
$logger $logger
->expects($this->once()) ->expects($this->once())
->method('doLog') ->method('doLog')
->with($this->equalTo($granting), $this->equalTo($ace)) ->with($this->equalTo($granting), $this->equalTo($ace))
; ;
} else { } else {
$logger $logger

View File

@ -27,8 +27,8 @@ class SecurityIdentityRetrievalStrategyTest extends TestCase
if ('anonymous' === $authenticationStatus) { if ('anonymous' === $authenticationStatus) {
$token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\AnonymousToken') $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\AnonymousToken')
->disableOriginalConstructor() ->disableOriginalConstructor()
->getMock(); ->getMock();
} else { } else {
$class = ''; $class = '';
if (is_string($user)) { if (is_string($user)) {
@ -36,8 +36,8 @@ class SecurityIdentityRetrievalStrategyTest extends TestCase
} }
$token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface') $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')
->setMockClassName($class) ->setMockClassName($class)
->getMock(); ->getMock();
} }
$token $token
->expects($this->once()) ->expects($this->once())

View File

@ -45,8 +45,8 @@ class UserSecurityIdentityTest extends TestCase
public function getCompareData() public function getCompareData()
{ {
$account = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface') $account = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')
->setMockClassName('USI_AccountImpl') ->setMockClassName('USI_AccountImpl')
->getMock(); ->getMock();
$account $account
->expects($this->any()) ->expects($this->any())
->method('getUsername') ->method('getUsername')

View File

@ -83,12 +83,12 @@ class UrlValidator extends ConstraintValidator
if (!is_string($host) || !checkdnsrr($host, 'ANY')) { if (!is_string($host) || !checkdnsrr($host, 'ANY')) {
if ($this->context instanceof ExecutionContextInterface) { if ($this->context instanceof ExecutionContextInterface) {
$this->context->buildViolation($constraint->dnsMessage) $this->context->buildViolation($constraint->dnsMessage)
->setParameter('{{ value }}', $this->formatValue($host)) ->setParameter('{{ value }}', $this->formatValue($host))
->addViolation(); ->addViolation();
} else { } else {
$this->buildViolation($constraint->dnsMessage) $this->buildViolation($constraint->dnsMessage)
->setParameter('{{ value }}', $this->formatValue($host)) ->setParameter('{{ value }}', $this->formatValue($host))
->addViolation(); ->addViolation();
} }
} }
} }

View File

@ -23,13 +23,13 @@ class LoaderChainTest extends TestCase
$loader1 = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Loader\LoaderInterface')->getMock(); $loader1 = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Loader\LoaderInterface')->getMock();
$loader1->expects($this->once()) $loader1->expects($this->once())
->method('loadClassMetadata') ->method('loadClassMetadata')
->with($this->equalTo($metadata)); ->with($this->equalTo($metadata));
$loader2 = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Loader\LoaderInterface')->getMock(); $loader2 = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Loader\LoaderInterface')->getMock();
$loader2->expects($this->once()) $loader2->expects($this->once())
->method('loadClassMetadata') ->method('loadClassMetadata')
->with($this->equalTo($metadata)); ->with($this->equalTo($metadata));
$chain = new LoaderChain(array( $chain = new LoaderChain(array(
$loader1, $loader1,
@ -45,13 +45,13 @@ class LoaderChainTest extends TestCase
$loader1 = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Loader\LoaderInterface')->getMock(); $loader1 = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Loader\LoaderInterface')->getMock();
$loader1->expects($this->any()) $loader1->expects($this->any())
->method('loadClassMetadata') ->method('loadClassMetadata')
->will($this->returnValue(true)); ->will($this->returnValue(true));
$loader2 = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Loader\LoaderInterface')->getMock(); $loader2 = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Loader\LoaderInterface')->getMock();
$loader2->expects($this->any()) $loader2->expects($this->any())
->method('loadClassMetadata') ->method('loadClassMetadata')
->will($this->returnValue(false)); ->will($this->returnValue(false));
$chain = new LoaderChain(array( $chain = new LoaderChain(array(
$loader1, $loader1,
@ -67,13 +67,13 @@ class LoaderChainTest extends TestCase
$loader1 = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Loader\LoaderInterface')->getMock(); $loader1 = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Loader\LoaderInterface')->getMock();
$loader1->expects($this->any()) $loader1->expects($this->any())
->method('loadClassMetadata') ->method('loadClassMetadata')
->will($this->returnValue(false)); ->will($this->returnValue(false));
$loader2 = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Loader\LoaderInterface')->getMock(); $loader2 = $this->getMockBuilder('Symfony\Component\Validator\Mapping\Loader\LoaderInterface')->getMock();
$loader2->expects($this->any()) $loader2->expects($this->any())
->method('loadClassMetadata') ->method('loadClassMetadata')
->will($this->returnValue(false)); ->will($this->returnValue(false));
$chain = new LoaderChain(array( $chain = new LoaderChain(array(
$loader1, $loader1,