Skip to content

Commit a32e1f3

Browse files
Merge branch '2.6' into 2.7
* 2.6: (24 commits) [Form] fixed a maxlength overring on a guessing [Debug] Show only unique class candidates [SecurityBundle] Firewall providers building - code cleaning [Filesystem] symlink use RealPath instead LinkTarget [DependencyInjection] Remove duplicate declaration in PhpDumper terminals are not interactive on Travis Revert "[DependencyInjection] backport perf optim" [WebProfiler] Tweaked ajax requests toolbar css reset [WebProfilerBundle] replaced pattern to path attribute in routes definitions. fix phpdoc's alignment Fix missing addExpressionLanguageProvider (used by service container to add expression providers) Fixed the AuthenticationProviderInterface alignment Fixed the proxy-manager version constraint Fix missing space in label_attr fix DumpDataCollectorTest after CS changes avoid risky tests Fixed typo in SecurityContext PHPDoc [FrameworkBundle][Template name] avoid error message for the shortcut notation. [DependencyInjection] perf optim: call dirname() at most 5x [DependencyInjection] backport perf optim ...
2 parents d9487c6 + de86596 commit a32e1f3

File tree

3 files changed

+22
-4
lines changed

3 files changed

+22
-4
lines changed

Tests/DataCollector/DumpDataCollectorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function testDump()
3030
$this->assertSame('dump', $collector->getName());
3131

3232
$collector->dump($data);
33-
$line = __LINE__;
33+
$line = __LINE__ - 1;
3434
$this->assertSame(1, $collector->getDumpsCount());
3535

3636
$dump = $collector->getDumps('html');
@@ -63,7 +63,7 @@ public function testFlush()
6363
$data = new Data(array(array(456)));
6464
$collector = new DumpDataCollector();
6565
$collector->dump($data);
66-
$line = __LINE__;
66+
$line = __LINE__ - 1;
6767

6868
ob_start();
6969
$collector = null;

Tests/Debug/TraceableEventDispatcherTest.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,24 @@ public function testStopwatchStopControllerOnRequestEvent()
7575
$kernel->handle($request);
7676
}
7777

78+
public function testAddListenerNested()
79+
{
80+
$called1 = false;
81+
$called2 = false;
82+
$dispatcher = new TraceableEventDispatcher(new EventDispatcher(), new Stopwatch());
83+
$dispatcher->addListener('my-event', function () use ($dispatcher, &$called1, &$called2) {
84+
$called1 = true;
85+
$dispatcher->addListener('my-event', function () use (&$called2) {
86+
$called2 = true;
87+
});
88+
});
89+
$dispatcher->dispatch('my-event');
90+
$this->assertTrue($called1);
91+
$this->assertFalse($called2);
92+
$dispatcher->dispatch('my-event');
93+
$this->assertTrue($called2);
94+
}
95+
7896
protected function getHttpKernel($dispatcher, $controller)
7997
{
8098
$resolver = $this->getMock('Symfony\Component\HttpKernel\Controller\ControllerResolverInterface');

Tests/HttpCache/TestHttpKernel.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ public function callController(Request $request)
7272

7373
$response = new Response($this->body, $this->status, $this->headers);
7474

75-
if (null !== $this->customizer) {
76-
call_user_func($this->customizer, $request, $response);
75+
if (null !== $customizer = $this->customizer) {
76+
$customizer($request, $response);
7777
}
7878

7979
return $response;

0 commit comments

Comments
 (0)