composeer update

This commit is contained in:
2019-06-23 11:49:01 +00:00
parent fc2380d68c
commit e9efe70112
327 changed files with 5194 additions and 2278 deletions

View File

@@ -59,7 +59,7 @@ class CacheWarmerAggregateTest extends TestCase
$warmer
->expects($this->once())
->method('isOptional')
->will($this->returnValue(true));
->willReturn(true);
$warmer
->expects($this->never())
->method('warmUp');

View File

@@ -23,7 +23,7 @@ class FileLocatorTest extends TestCase
->expects($this->atLeastOnce())
->method('locateResource')
->with('@BundleName/some/path', null, true)
->will($this->returnValue('/bundle-name/some/path'));
->willReturn('/bundle-name/some/path');
$locator = new FileLocator($kernel);
$this->assertEquals('/bundle-name/some/path', $locator->locate('@BundleName/some/path'));

View File

@@ -27,11 +27,11 @@ class ContainerControllerResolverTest extends ControllerResolverTest
$container->expects($this->once())
->method('has')
->with('foo')
->will($this->returnValue(true));
->willReturn(true);
$container->expects($this->once())
->method('get')
->with('foo')
->will($this->returnValue($service))
->willReturn($service)
;
$resolver = $this->createControllerResolver(null, $container);
@@ -52,11 +52,11 @@ class ContainerControllerResolverTest extends ControllerResolverTest
$container->expects($this->once())
->method('has')
->with('foo')
->will($this->returnValue(true));
->willReturn(true);
$container->expects($this->once())
->method('get')
->with('foo')
->will($this->returnValue($service))
->willReturn($service)
;
$resolver = $this->createControllerResolver(null, $container);
@@ -77,12 +77,12 @@ class ContainerControllerResolverTest extends ControllerResolverTest
$container->expects($this->once())
->method('has')
->with('foo')
->will($this->returnValue(true))
->willReturn(true)
;
$container->expects($this->once())
->method('get')
->with('foo')
->will($this->returnValue($service))
->willReturn($service)
;
$resolver = $this->createControllerResolver(null, $container);
@@ -102,12 +102,12 @@ class ContainerControllerResolverTest extends ControllerResolverTest
$container->expects($this->once())
->method('has')
->with(InvokableControllerService::class)
->will($this->returnValue(true))
->willReturn(true)
;
$container->expects($this->once())
->method('get')
->with(InvokableControllerService::class)
->will($this->returnValue($service))
->willReturn($service)
;
$resolver = $this->createControllerResolver(null, $container);
@@ -131,13 +131,13 @@ class ContainerControllerResolverTest extends ControllerResolverTest
$container->expects($this->once())
->method('has')
->with(ControllerTestService::class)
->will($this->returnValue(false))
->willReturn(false)
;
$container->expects($this->atLeastOnce())
->method('getRemovedIds')
->with()
->will($this->returnValue([ControllerTestService::class => true]))
->willReturn([ControllerTestService::class => true])
;
$resolver = $this->createControllerResolver(null, $container);
@@ -159,13 +159,13 @@ class ContainerControllerResolverTest extends ControllerResolverTest
$container->expects($this->once())
->method('has')
->with('app.my_controller')
->will($this->returnValue(false))
->willReturn(false)
;
$container->expects($this->atLeastOnce())
->method('getRemovedIds')
->with()
->will($this->returnValue(['app.my_controller' => true]))
->willReturn(['app.my_controller' => true])
;
$resolver = $this->createControllerResolver(null, $container);

View File

@@ -27,8 +27,8 @@ class LoggerDataCollectorTest extends TestCase
->getMockBuilder('Symfony\Component\HttpKernel\Log\DebugLoggerInterface')
->setMethods(['countErrors', 'getLogs', 'clear'])
->getMock();
$logger->expects($this->once())->method('countErrors')->will($this->returnValue('foo'));
$logger->expects($this->exactly(2))->method('getLogs')->will($this->returnValue([]));
$logger->expects($this->once())->method('countErrors')->willReturn('foo');
$logger->expects($this->exactly(2))->method('getLogs')->willReturn([]);
$c = new LoggerDataCollector($logger, __DIR__.'/');
$c->lateCollect();
@@ -56,7 +56,7 @@ class LoggerDataCollectorTest extends TestCase
->setMethods(['countErrors', 'getLogs', 'clear'])
->getMock();
$logger->expects($this->once())->method('countErrors')->with(null);
$logger->expects($this->exactly(2))->method('getLogs')->with(null)->will($this->returnValue([]));
$logger->expects($this->exactly(2))->method('getLogs')->with(null)->willReturn([]);
$c = new LoggerDataCollector($logger, __DIR__.'/', $stack);
@@ -77,7 +77,7 @@ class LoggerDataCollectorTest extends TestCase
->setMethods(['countErrors', 'getLogs', 'clear'])
->getMock();
$logger->expects($this->once())->method('countErrors')->with($subRequest);
$logger->expects($this->exactly(2))->method('getLogs')->with($subRequest)->will($this->returnValue([]));
$logger->expects($this->exactly(2))->method('getLogs')->with($subRequest)->willReturn([]);
$c = new LoggerDataCollector($logger, __DIR__.'/', $stack);
@@ -94,8 +94,8 @@ class LoggerDataCollectorTest extends TestCase
->getMockBuilder('Symfony\Component\HttpKernel\Log\DebugLoggerInterface')
->setMethods(['countErrors', 'getLogs', 'clear'])
->getMock();
$logger->expects($this->once())->method('countErrors')->will($this->returnValue($nb));
$logger->expects($this->exactly(2))->method('getLogs')->will($this->returnValue($logs));
$logger->expects($this->once())->method('countErrors')->willReturn($nb);
$logger->expects($this->exactly(2))->method('getLogs')->willReturn($logs);
$c = new LoggerDataCollector($logger);
$c->lateCollect();

View File

@@ -44,7 +44,7 @@ class TimeDataCollectorTest extends TestCase
$this->assertEquals(0, $c->getStartTime());
$kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\KernelInterface')->getMock();
$kernel->expects($this->once())->method('getStartTime')->will($this->returnValue(123456));
$kernel->expects($this->once())->method('getStartTime')->willReturn(123456);
$c = new TimeDataCollector($kernel);
$request = new Request();

View File

@@ -50,7 +50,7 @@ class TraceableEventDispatcherTest extends TestCase
->getMock();
$stopwatch->expects($this->once())
->method('isStarted')
->will($this->returnValue(false));
->willReturn(false);
$dispatcher = new TraceableEventDispatcher(new EventDispatcher(), $stopwatch);
@@ -66,7 +66,7 @@ class TraceableEventDispatcherTest extends TestCase
->getMock();
$stopwatch->expects($this->once())
->method('isStarted')
->will($this->returnValue(true));
->willReturn(true);
$stopwatch->expects($this->once())
->method('stop');
$stopwatch->expects($this->once())
@@ -113,9 +113,9 @@ class TraceableEventDispatcherTest extends TestCase
protected function getHttpKernel($dispatcher, $controller)
{
$controllerResolver = $this->getMockBuilder('Symfony\Component\HttpKernel\Controller\ControllerResolverInterface')->getMock();
$controllerResolver->expects($this->once())->method('getController')->will($this->returnValue($controller));
$controllerResolver->expects($this->once())->method('getController')->willReturn($controller);
$argumentResolver = $this->getMockBuilder('Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface')->getMock();
$argumentResolver->expects($this->once())->method('getArguments')->will($this->returnValue([]));
$argumentResolver->expects($this->once())->method('getArguments')->willReturn([]);
return new HttpKernel($dispatcher, $controllerResolver, new RequestStack(), $argumentResolver);
}

View File

@@ -21,15 +21,15 @@ class LazyLoadingFragmentHandlerTest extends TestCase
public function testRender()
{
$renderer = $this->getMockBuilder('Symfony\Component\HttpKernel\Fragment\FragmentRendererInterface')->getMock();
$renderer->expects($this->once())->method('getName')->will($this->returnValue('foo'));
$renderer->expects($this->any())->method('render')->will($this->returnValue(new Response()));
$renderer->expects($this->once())->method('getName')->willReturn('foo');
$renderer->expects($this->any())->method('render')->willReturn(new Response());
$requestStack = $this->getMockBuilder('Symfony\Component\HttpFoundation\RequestStack')->getMock();
$requestStack->expects($this->any())->method('getCurrentRequest')->will($this->returnValue(Request::create('/')));
$requestStack->expects($this->any())->method('getCurrentRequest')->willReturn(Request::create('/'));
$container = $this->getMockBuilder('Psr\Container\ContainerInterface')->getMock();
$container->expects($this->once())->method('has')->with('foo')->willReturn(true);
$container->expects($this->once())->method('get')->will($this->returnValue($renderer));
$container->expects($this->once())->method('get')->willReturn($renderer);
$handler = new LazyLoadingFragmentHandler($container, $requestStack, false);

View File

@@ -78,7 +78,7 @@ class AddRequestFormatsListenerTest extends TestCase
$event->expects($this->any())
->method('getRequest')
->will($this->returnValue($request));
->willReturn($request);
return $event;
}

View File

@@ -94,7 +94,7 @@ class DebugHandlersListenerTest extends TestCase
$dispatcher = new EventDispatcher();
$listener = new DebugHandlersListener(null);
$app = $this->getMockBuilder('Symfony\Component\Console\Application')->getMock();
$app->expects($this->once())->method('getHelperSet')->will($this->returnValue(new HelperSet()));
$app->expects($this->once())->method('getHelperSet')->willReturn(new HelperSet());
$command = new Command(__FUNCTION__);
$command->setApplication($app);
$event = new ConsoleEvent($command, new ArgvInput(), new ConsoleOutput());
@@ -104,6 +104,7 @@ class DebugHandlersListenerTest extends TestCase
$xListeners = [
KernelEvents::REQUEST => [[$listener, 'configure']],
ConsoleEvents::COMMAND => [[$listener, 'configure']],
KernelEvents::EXCEPTION => [[$listener, 'onKernelException']],
];
$this->assertSame($xListeners, $dispatcher->getListeners());

View File

@@ -116,9 +116,9 @@ class ExceptionListenerTest extends TestCase
$listener = new ExceptionListener('foo', $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock());
$kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock();
$kernel->expects($this->once())->method('handle')->will($this->returnCallback(function (Request $request) {
$kernel->expects($this->once())->method('handle')->willReturnCallback(function (Request $request) {
return new Response($request->getRequestFormat());
}));
});
$request = Request::create('/');
$request->setRequestFormat('xml');
@@ -134,9 +134,9 @@ class ExceptionListenerTest extends TestCase
{
$dispatcher = new EventDispatcher();
$kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock();
$kernel->expects($this->once())->method('handle')->will($this->returnCallback(function (Request $request) {
$kernel->expects($this->once())->method('handle')->willReturnCallback(function (Request $request) {
return new Response($request->getRequestFormat());
}));
});
$listener = new ExceptionListener('foo', $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock(), true);
@@ -155,25 +155,6 @@ class ExceptionListenerTest extends TestCase
$this->assertFalse($response->headers->has('content-security-policy'), 'CSP header has been removed');
$this->assertFalse($dispatcher->hasListeners(KernelEvents::RESPONSE), 'CSP removal listener has been removed');
}
public function testNullController()
{
$listener = new ExceptionListener(null);
$kernel = $this->getMockBuilder(HttpKernelInterface::class)->getMock();
$kernel->expects($this->once())->method('handle')->will($this->returnCallback(function (Request $request) {
$controller = $request->attributes->get('_controller');
return $controller();
}));
$request = Request::create('/');
$event = new ExceptionEvent($kernel, $request, HttpKernelInterface::MASTER_REQUEST, new \Exception('foo'));
$listener->onKernelException($event);
$this->assertNull($event->getResponse());
$listener->onKernelException($event);
$this->assertContains('Whoops, looks like something went wrong.', $event->getResponse()->getContent());
}
}
class TestLogger extends Logger implements DebugLoggerInterface

View File

@@ -73,7 +73,7 @@ class LocaleListenerTest extends TestCase
$context->expects($this->once())->method('setParameter')->with('_locale', 'es');
$router = $this->getMockBuilder('Symfony\Component\Routing\Router')->setMethods(['getContext'])->disableOriginalConstructor()->getMock();
$router->expects($this->once())->method('getContext')->will($this->returnValue($context));
$router->expects($this->once())->method('getContext')->willReturn($context);
$request = Request::create('/');
@@ -89,12 +89,12 @@ class LocaleListenerTest extends TestCase
$context->expects($this->once())->method('setParameter')->with('_locale', 'es');
$router = $this->getMockBuilder('Symfony\Component\Routing\Router')->setMethods(['getContext'])->disableOriginalConstructor()->getMock();
$router->expects($this->once())->method('getContext')->will($this->returnValue($context));
$router->expects($this->once())->method('getContext')->willReturn($context);
$parentRequest = Request::create('/');
$parentRequest->setLocale('es');
$this->requestStack->expects($this->once())->method('getParentRequest')->will($this->returnValue($parentRequest));
$this->requestStack->expects($this->once())->method('getParentRequest')->willReturn($parentRequest);
$event = $this->getMockBuilder('Symfony\Component\HttpKernel\Event\FinishRequestEvent')->disableOriginalConstructor()->getMock();

View File

@@ -36,7 +36,7 @@ class ProfilerListenerTest extends TestCase
$profiler->expects($this->once())
->method('collect')
->will($this->returnValue($profile));
->willReturn($profile);
$kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock();

View File

@@ -49,7 +49,7 @@ class RouterListenerTest extends TestCase
$context->setHttpsPort($defaultHttpsPort);
$urlMatcher->expects($this->any())
->method('getContext')
->will($this->returnValue($context));
->willReturn($context);
$listener = new RouterListener($urlMatcher, $this->requestStack);
$event = $this->createRequestEventForUri($uri);
@@ -97,7 +97,7 @@ class RouterListenerTest extends TestCase
$requestMatcher->expects($this->once())
->method('matchRequest')
->with($this->isInstanceOf('Symfony\Component\HttpFoundation\Request'))
->will($this->returnValue([]));
->willReturn([]);
$listener = new RouterListener($requestMatcher, $this->requestStack, new RequestContext());
$listener->onKernelRequest($event);
@@ -113,7 +113,7 @@ class RouterListenerTest extends TestCase
$requestMatcher->expects($this->any())
->method('matchRequest')
->with($this->isInstanceOf('Symfony\Component\HttpFoundation\Request'))
->will($this->returnValue([]));
->willReturn([]);
$context = new RequestContext();
@@ -138,7 +138,7 @@ class RouterListenerTest extends TestCase
$requestMatcher = $this->getMockBuilder('Symfony\Component\Routing\Matcher\RequestMatcherInterface')->getMock();
$requestMatcher->expects($this->once())
->method('matchRequest')
->will($this->returnValue($parameter));
->willReturn($parameter);
$logger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock();
$logger->expects($this->once())

View File

@@ -46,7 +46,7 @@ class TestSessionListenerTest extends TestCase
$this->session = $this->getSession();
$this->listener->expects($this->any())
->method('getSession')
->will($this->returnValue($this->session));
->willReturn($this->session);
}
public function testShouldSaveMasterRequestSession()
@@ -183,28 +183,28 @@ class TestSessionListenerTest extends TestCase
{
$this->session->expects($this->once())
->method('isStarted')
->will($this->returnValue(true));
->willReturn(true);
}
private function sessionHasNotBeenStarted()
{
$this->session->expects($this->once())
->method('isStarted')
->will($this->returnValue(false));
->willReturn(false);
}
private function sessionIsEmpty()
{
$this->session->expects($this->once())
->method('isEmpty')
->will($this->returnValue(true));
->willReturn(true);
}
private function fixSessionId($sessionId)
{
$this->session->expects($this->any())
->method('getId')
->will($this->returnValue($sessionId));
->willReturn($sessionId);
}
private function getSession()
@@ -214,7 +214,7 @@ class TestSessionListenerTest extends TestCase
->getMock();
// set return value for getName()
$mock->expects($this->any())->method('getName')->will($this->returnValue('MOCKSESSID'));
$mock->expects($this->any())->method('getName')->willReturn('MOCKSESSID');
return $mock;
}

View File

@@ -117,6 +117,6 @@ class TranslatorListenerTest extends TestCase
$this->requestStack
->expects($this->any())
->method('getParentRequest')
->will($this->returnValue($request));
->willReturn($request);
}
}

View File

@@ -32,7 +32,7 @@ class FragmentHandlerTest extends TestCase
$this->requestStack
->expects($this->any())
->method('getCurrentRequest')
->will($this->returnValue(Request::create('/')))
->willReturn(Request::create('/'))
;
}
@@ -79,7 +79,7 @@ class FragmentHandlerTest extends TestCase
$renderer
->expects($this->any())
->method('getName')
->will($this->returnValue('foo'))
->willReturn('foo')
;
$e = $renderer
->expects($this->any())

View File

@@ -124,18 +124,18 @@ class InlineFragmentRendererTest extends TestCase
$controllerResolver
->expects($this->once())
->method('getController')
->will($this->returnValue(function () {
->willReturn(function () {
ob_start();
echo 'bar';
throw new \RuntimeException();
}))
})
;
$argumentResolver = $this->getMockBuilder('Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolverInterface')->getMock();
$argumentResolver
->expects($this->once())
->method('getArguments')
->will($this->returnValue([]))
->willReturn([])
;
$kernel = new HttpKernel(new EventDispatcher(), $controllerResolver, new RequestStack(), $argumentResolver);

View File

@@ -229,7 +229,7 @@ class EsiTest extends TestCase
$cache = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpCache\HttpCache')->setMethods(['getRequest', 'handle'])->disableOriginalConstructor()->getMock();
$cache->expects($this->any())
->method('getRequest')
->will($this->returnValue($request))
->willReturn($request)
;
if (\is_array($response)) {
$cache->expects($this->any())
@@ -239,7 +239,7 @@ class EsiTest extends TestCase
} else {
$cache->expects($this->any())
->method('handle')
->will($this->returnValue($response))
->willReturn($response)
;
}

View File

@@ -196,7 +196,7 @@ class SsiTest extends TestCase
$cache = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpCache\HttpCache')->setMethods(['getRequest', 'handle'])->disableOriginalConstructor()->getMock();
$cache->expects($this->any())
->method('getRequest')
->will($this->returnValue($request))
->willReturn($request)
;
if (\is_array($response)) {
$cache->expects($this->any())
@@ -206,7 +206,7 @@ class SsiTest extends TestCase
} else {
$cache->expects($this->any())
->method('handle')
->will($this->returnValue($response))
->willReturn($response)
;
}

View File

@@ -156,11 +156,11 @@ class HttpKernelBrowserTest extends TestCase
/* should be modified when the getClientSize will be removed */
$file->expects($this->any())
->method('getSize')
->will($this->returnValue(INF))
->willReturn(INF)
;
$file->expects($this->any())
->method('getClientSize')
->will($this->returnValue(INF))
->willReturn(INF)
;
$client->request('POST', '/', [], [$file]);

View File

@@ -351,13 +351,13 @@ class HttpKernelTest extends TestCase
$controllerResolver
->expects($this->any())
->method('getController')
->will($this->returnValue($controller));
->willReturn($controller);
$argumentResolver = $this->getMockBuilder(ArgumentResolverInterface::class)->getMock();
$argumentResolver
->expects($this->any())
->method('getArguments')
->will($this->returnValue($arguments));
->willReturn($arguments);
return new HttpKernel($eventDispatcher, $controllerResolver, $requestStack, $argumentResolver);
}

View File

@@ -123,7 +123,7 @@ class KernelTest extends TestCase
$kernel = $this->getKernel(['initializeBundles', 'initializeContainer', 'getBundles']);
$kernel->expects($this->once())
->method('getBundles')
->will($this->returnValue([$bundle]));
->willReturn([$bundle]);
$kernel->boot();
}
@@ -178,7 +178,7 @@ class KernelTest extends TestCase
$kernel = $this->getKernel(['getBundles']);
$kernel->expects($this->any())
->method('getBundles')
->will($this->returnValue([$bundle]));
->willReturn([$bundle]);
$kernel->boot();
$kernel->shutdown();
@@ -201,7 +201,7 @@ class KernelTest extends TestCase
$kernel = $this->getKernel(['getHttpKernel']);
$kernel->expects($this->once())
->method('getHttpKernel')
->will($this->returnValue($httpKernelMock));
->willReturn($httpKernelMock);
$kernel->handle($request, $type, $catch);
}
@@ -219,7 +219,7 @@ class KernelTest extends TestCase
$kernel = $this->getKernel(['getHttpKernel', 'boot']);
$kernel->expects($this->once())
->method('getHttpKernel')
->will($this->returnValue($httpKernelMock));
->willReturn($httpKernelMock);
$kernel->expects($this->once())
->method('boot');
@@ -381,7 +381,7 @@ EOF;
$kernel
->expects($this->once())
->method('getBundle')
->will($this->returnValue($this->getBundle(__DIR__.'/Fixtures/Bundle1Bundle')))
->willReturn($this->getBundle(__DIR__.'/Fixtures/Bundle1Bundle'))
;
$kernel->locateResource('@Bundle1Bundle/config/routing.xml');
@@ -393,7 +393,7 @@ EOF;
$kernel
->expects($this->once())
->method('getBundle')
->will($this->returnValue($this->getBundle(__DIR__.'/Fixtures/Bundle1Bundle')))
->willReturn($this->getBundle(__DIR__.'/Fixtures/Bundle1Bundle'))
;
$this->assertEquals(__DIR__.'/Fixtures/Bundle1Bundle/foo.txt', $kernel->locateResource('@Bundle1Bundle/foo.txt'));
@@ -405,7 +405,7 @@ EOF;
$kernel
->expects($this->once())
->method('getBundle')
->will($this->returnValue($this->getBundle(__DIR__.'/Fixtures/Bundle1Bundle')))
->willReturn($this->getBundle(__DIR__.'/Fixtures/Bundle1Bundle'))
;
$this->assertEquals(
@@ -420,7 +420,7 @@ EOF;
$kernel
->expects($this->once())
->method('getBundle')
->will($this->returnValue($this->getBundle(__DIR__.'/Fixtures/FooBundle', null, null, 'FooBundle')))
->willReturn($this->getBundle(__DIR__.'/Fixtures/FooBundle', null, null, 'FooBundle'))
;
$this->assertEquals(
@@ -435,7 +435,7 @@ EOF;
$kernel
->expects($this->exactly(2))
->method('getBundle')
->will($this->returnValue($this->getBundle(__DIR__.'/Fixtures/FooBundle', null, null, 'FooBundle')))
->willReturn($this->getBundle(__DIR__.'/Fixtures/FooBundle', null, null, 'FooBundle'))
;
$this->assertEquals(
@@ -451,7 +451,7 @@ EOF;
$kernel
->expects($this->exactly(2))
->method('getBundle')
->will($this->returnValue($this->getBundle(__DIR__.'/Fixtures/Bundle1Bundle', null, null, 'Bundle1Bundle')))
->willReturn($this->getBundle(__DIR__.'/Fixtures/Bundle1Bundle', null, null, 'Bundle1Bundle'))
;
$this->assertEquals(
@@ -514,7 +514,7 @@ EOF;
$kernel = $this->getKernel(['getHttpKernel']);
$kernel->expects($this->exactly(2))
->method('getHttpKernel')
->will($this->returnValue($httpKernelMock));
->willReturn($httpKernelMock);
$kernel->boot();
$kernel->terminate(Request::create('/'), new Response());
@@ -640,19 +640,19 @@ EOF;
$bundle
->expects($this->any())
->method('getName')
->will($this->returnValue(null === $bundleName ? \get_class($bundle) : $bundleName))
->willReturn(null === $bundleName ? \get_class($bundle) : $bundleName)
;
$bundle
->expects($this->any())
->method('getPath')
->will($this->returnValue($dir))
->willReturn($dir)
;
$bundle
->expects($this->any())
->method('getParent')
->will($this->returnValue($parent))
->willReturn($parent)
;
return $bundle;
@@ -678,7 +678,7 @@ EOF;
;
$kernel->expects($this->any())
->method('registerBundles')
->will($this->returnValue($bundles))
->willReturn($bundles)
;
$p = new \ReflectionProperty($kernel, 'rootDir');
$p->setAccessible(true);

View File

@@ -149,7 +149,7 @@ class LoggerTest extends TestCase
}
$dummy->expects($this->atLeastOnce())
->method('__toString')
->will($this->returnValue('DUMMY'));
->willReturn('DUMMY');
$this->logger->warning($dummy);