Fix merge

This commit is contained in:
Nicolas Grekas 2015-07-01 14:07:40 +02:00
parent eb179f9032
commit b4fc321912
5 changed files with 19 additions and 24 deletions

View File

@ -123,7 +123,7 @@ class SwitchUserListenerTest extends \PHPUnit_Framework_TestCase
->getMock(); ->getMock();
$role->expects($this->any())->method('getSource')->willReturn($originalToken); $role->expects($this->any())->method('getSource')->willReturn($originalToken);
$this $this
->securityContext ->tokenStorage
->expects($this->any()) ->expects($this->any())
->method('getToken') ->method('getToken')
->willReturn($this->getToken(array($role))); ->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); $listener->handle($this->event);
} }

View File

@ -28,36 +28,31 @@ class ReflectionCasterTest extends VarDumperTestCase
<<<'EOTXT' <<<'EOTXT'
ReflectionClass { ReflectionClass {
+name: "ReflectionClass" +name: "ReflectionClass"
implements: array:1 [ %Aimplements: array:%d [
0 => "Reflector" 0 => "Reflector"
] %A]
constants: array:3 [ constants: array:3 [
"IS_IMPLICIT_ABSTRACT" => 16 "IS_IMPLICIT_ABSTRACT" => 16
"IS_EXPLICIT_ABSTRACT" => 32 "IS_EXPLICIT_ABSTRACT" => 32
"IS_FINAL" => 64 "IS_FINAL" => 64
] ]
properties: array:1 [ properties: array:%d [
"name" => ReflectionProperty { "name" => ReflectionProperty {
+name: "name" %A +name: "name"
+class: "ReflectionClass" +class: "ReflectionClass"
modifiers: "public" %A modifiers: "public"
extra: null extra: null
} }
] %A]
methods: array:%d [ methods: array:%d [
%A %A
"export" => ReflectionMethod { "export" => ReflectionMethod {
+name: "export" +name: "export"
+class: "ReflectionClass" +class: "ReflectionClass"
parameters: array:2 [ parameters: array:2 [
"$argument" => ReflectionParameter { "$%s" => ReflectionParameter {
+name: "argument" %A position: 0
position: 0 %A }
}
"$return" => ReflectionParameter {
+name: "return"
position: 1
}
] ]
modifiers: "public static" modifiers: "public static"
} }

View File

@ -43,16 +43,16 @@ class CliDumperTest extends VarDumperTestCase
$intMax = PHP_INT_MAX; $intMax = PHP_INT_MAX;
$res = (int) $var['res']; $res = (int) $var['res'];
$closure54 = ''; $closure54 = '';
$r = defined('HHVM_VERSION') ? '' : '#%d';
if (PHP_VERSION_ID >= 50400) { if (PHP_VERSION_ID >= 50400) {
$closure54 = <<<EOTXT $closure54 = <<<EOTXT
class: "Symfony\Component\VarDumper\Tests\CliDumperTest" class: "Symfony\Component\VarDumper\Tests\CliDumperTest"
this: Symfony\Component\VarDumper\Tests\CliDumperTest {#%d …} this: Symfony\Component\VarDumper\Tests\CliDumperTest {{$r} }
EOTXT; EOTXT;
} }
$r = defined('HHVM_VERSION') ? '' : '#%d';
$this->assertStringMatchesFormat( $this->assertStringMatchesFormat(
<<<EOTXT <<<EOTXT
array:24 [ array:24 [
@ -123,11 +123,11 @@ EOTXT
$var = xml_parser_create(); $var = xml_parser_create();
$this->assertDumpEquals( $this->assertDumpMatchesFormat(
<<<EOTXT <<<EOTXT
xml resource { xml resource {
current_byte_index: 0 current_byte_index: %i
current_column_number: 1 current_column_number: %i
current_line_number: 1 current_line_number: 1
error_code: XML_ERROR_NONE error_code: XML_ERROR_NONE
} }

View File

@ -46,16 +46,16 @@ class HtmlDumperTest extends \PHPUnit_Framework_TestCase
$dumpId = $dumpId[0]; $dumpId = $dumpId[0];
$res = (int) $var['res']; $res = (int) $var['res'];
$closure54 = ''; $closure54 = '';
$r = defined('HHVM_VERSION') ? '' : '<a class=sf-dump-ref>#%d</a>';
if (PHP_VERSION_ID >= 50400) { if (PHP_VERSION_ID >= 50400) {
$closure54 = <<<EOTXT $closure54 = <<<EOTXT
<span class=sf-dump-meta>class</span>: "<span class=sf-dump-str title="48 characters">Symfony\Component\VarDumper\Tests\HtmlDumperTest</span>" <span class=sf-dump-meta>class</span>: "<span class=sf-dump-str title="48 characters">Symfony\Component\VarDumper\Tests\HtmlDumperTest</span>"
<span class=sf-dump-meta>this</span>: <abbr title="Symfony\Component\VarDumper\Tests\HtmlDumperTest" class=sf-dump-note>HtmlDumperTest</abbr> {<a class=sf-dump-ref>#%d</a> &#8230;} <span class=sf-dump-meta>this</span>: <abbr title="Symfony\Component\VarDumper\Tests\HtmlDumperTest" class=sf-dump-note>HtmlDumperTest</abbr> {{$r} &#8230;}
EOTXT; EOTXT;
} }
$r = defined('HHVM_VERSION') ? '' : '<a class=sf-dump-ref>#%d</a>';
$this->assertStringMatchesFormat( $this->assertStringMatchesFormat(
<<<EOTXT <<<EOTXT
<foo></foo><bar><span class=sf-dump-note>array:24</span> [<samp> <foo></foo><bar><span class=sf-dump-note>array:24</span> [<samp>

View File

@ -162,7 +162,7 @@ Symfony\Component\VarDumper\Cloner\Data Object
[class] => %s [class] => %s
[value] => [value] =>
[cut] => 0 [cut] => 0
[handle] => %d [handle] => %i
[refCount] => 0 [refCount] => 0
[position] => 1 [position] => 1
) )