From b4fc3219125c097a71c0a985a0f2667ec7d85e9e Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 1 Jul 2015 14:07:40 +0200 Subject: [PATCH] Fix merge --- .../Tests/Firewall/SwitchUserListenerTest.php | 4 ++-- .../Tests/Caster/ReflectionCasterTest.php | 23 ++++++++----------- .../VarDumper/Tests/CliDumperTest.php | 10 ++++---- .../VarDumper/Tests/HtmlDumperTest.php | 4 ++-- .../VarDumper/Tests/VarClonerTest.php | 2 +- 5 files changed, 19 insertions(+), 24 deletions(-) diff --git a/src/Symfony/Component/Security/Http/Tests/Firewall/SwitchUserListenerTest.php b/src/Symfony/Component/Security/Http/Tests/Firewall/SwitchUserListenerTest.php index eaa72db9b6..f43b564322 100644 --- a/src/Symfony/Component/Security/Http/Tests/Firewall/SwitchUserListenerTest.php +++ b/src/Symfony/Component/Security/Http/Tests/Firewall/SwitchUserListenerTest.php @@ -123,7 +123,7 @@ class SwitchUserListenerTest extends \PHPUnit_Framework_TestCase ->getMock(); $role->expects($this->any())->method('getSource')->willReturn($originalToken); $this - ->securityContext + ->tokenStorage ->expects($this->any()) ->method('getToken') ->willReturn($this->getToken(array($role))); @@ -154,7 +154,7 @@ class SwitchUserListenerTest extends \PHPUnit_Framework_TestCase })) ; - $listener = new SwitchUserListener($this->securityContext, $this->userProvider, $this->userChecker, 'provider123', $this->accessDecisionManager, null, '_switch_user', 'ROLE_ALLOWED_TO_SWITCH', $dispatcher); + $listener = new SwitchUserListener($this->tokenStorage, $this->userProvider, $this->userChecker, 'provider123', $this->accessDecisionManager, null, '_switch_user', 'ROLE_ALLOWED_TO_SWITCH', $dispatcher); $listener->handle($this->event); } diff --git a/src/Symfony/Component/VarDumper/Tests/Caster/ReflectionCasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/ReflectionCasterTest.php index be4947278d..ecf776d70f 100644 --- a/src/Symfony/Component/VarDumper/Tests/Caster/ReflectionCasterTest.php +++ b/src/Symfony/Component/VarDumper/Tests/Caster/ReflectionCasterTest.php @@ -28,36 +28,31 @@ class ReflectionCasterTest extends VarDumperTestCase <<<'EOTXT' ReflectionClass { +name: "ReflectionClass" - implements: array:1 [ +%Aimplements: array:%d [ 0 => "Reflector" - ] +%A] constants: array:3 [ "IS_IMPLICIT_ABSTRACT" => 16 "IS_EXPLICIT_ABSTRACT" => 32 "IS_FINAL" => 64 ] - properties: array:1 [ + properties: array:%d [ "name" => ReflectionProperty { - +name: "name" +%A +name: "name" +class: "ReflectionClass" - modifiers: "public" +%A modifiers: "public" extra: null } - ] +%A] methods: array:%d [ %A "export" => ReflectionMethod { +name: "export" +class: "ReflectionClass" parameters: array:2 [ - "$argument" => ReflectionParameter { - +name: "argument" - position: 0 - } - "$return" => ReflectionParameter { - +name: "return" - position: 1 - } + "$%s" => ReflectionParameter { +%A position: 0 +%A } ] modifiers: "public static" } diff --git a/src/Symfony/Component/VarDumper/Tests/CliDumperTest.php b/src/Symfony/Component/VarDumper/Tests/CliDumperTest.php index 245f5a26e9..316e3c61c5 100644 --- a/src/Symfony/Component/VarDumper/Tests/CliDumperTest.php +++ b/src/Symfony/Component/VarDumper/Tests/CliDumperTest.php @@ -43,16 +43,16 @@ class CliDumperTest extends VarDumperTestCase $intMax = PHP_INT_MAX; $res = (int) $var['res']; $closure54 = ''; + $r = defined('HHVM_VERSION') ? '' : '#%d'; if (PHP_VERSION_ID >= 50400) { $closure54 = <<assertStringMatchesFormat( <<assertDumpEquals( + $this->assertDumpMatchesFormat( <<#%d'; if (PHP_VERSION_ID >= 50400) { $closure54 = <<class: "Symfony\Component\VarDumper\Tests\HtmlDumperTest" - this: HtmlDumperTest {#%d …} + this: HtmlDumperTest {{$r} …} EOTXT; } - $r = defined('HHVM_VERSION') ? '' : '#%d'; $this->assertStringMatchesFormat( <<array:24 [ diff --git a/src/Symfony/Component/VarDumper/Tests/VarClonerTest.php b/src/Symfony/Component/VarDumper/Tests/VarClonerTest.php index a6e9363bc5..31e3a40ae0 100644 --- a/src/Symfony/Component/VarDumper/Tests/VarClonerTest.php +++ b/src/Symfony/Component/VarDumper/Tests/VarClonerTest.php @@ -162,7 +162,7 @@ Symfony\Component\VarDumper\Cloner\Data Object [class] => %s [value] => [cut] => 0 - [handle] => %d + [handle] => %i [refCount] => 0 [position] => 1 )