composer update
This commit is contained in:
parent
f6abc3dce2
commit
71dfaca858
1753 changed files with 45274 additions and 14619 deletions
|
@ -68,14 +68,14 @@ EOTXT
|
|||
$var = function ($x) use ($a, &$b) {};
|
||||
|
||||
$this->assertDumpMatchesFormat(
|
||||
<<<EOTXT
|
||||
Closure {
|
||||
<<<'EOTXT'
|
||||
Closure($x) {
|
||||
%Aparameters: {
|
||||
\$x: {}
|
||||
$x: {}
|
||||
}
|
||||
use: {
|
||||
\$a: 123
|
||||
\$b: & 123
|
||||
$a: 123
|
||||
$b: & 123
|
||||
}
|
||||
file: "%sReflectionCasterTest.php"
|
||||
line: "68 to 68"
|
||||
|
@ -85,18 +85,39 @@ EOTXT
|
|||
);
|
||||
}
|
||||
|
||||
public function testFromCallableClosureCaster()
|
||||
{
|
||||
if (\defined('HHVM_VERSION_ID')) {
|
||||
$this->markTestSkipped('Not for HHVM.');
|
||||
}
|
||||
$var = array(
|
||||
(new \ReflectionMethod($this, __FUNCTION__))->getClosure($this),
|
||||
(new \ReflectionMethod(__CLASS__, 'tearDownAfterClass'))->getClosure(),
|
||||
);
|
||||
|
||||
$this->assertDumpMatchesFormat(
|
||||
<<<EOTXT
|
||||
array:2 [
|
||||
0 => Symfony\Component\VarDumper\Tests\Caster\ReflectionCasterTest::testFromCallableClosureCaster() {
|
||||
this: Symfony\Component\VarDumper\Tests\Caster\ReflectionCasterTest { …}
|
||||
file: "%sReflectionCasterTest.php"
|
||||
line: "%d to %d"
|
||||
}
|
||||
1 => %sTestCase::tearDownAfterClass() {
|
||||
file: "%sTestCase.php"
|
||||
line: "%d to %d"
|
||||
}
|
||||
]
|
||||
EOTXT
|
||||
, $var
|
||||
);
|
||||
}
|
||||
|
||||
public function testClosureCasterExcludingVerbosity()
|
||||
{
|
||||
$var = function () {};
|
||||
$var = function &($a = 5) {};
|
||||
|
||||
$expectedDump = <<<EOTXT
|
||||
Closure {
|
||||
class: "Symfony\Component\VarDumper\Tests\Caster\ReflectionCasterTest"
|
||||
this: Symfony\Component\VarDumper\Tests\Caster\ReflectionCasterTest { …}
|
||||
}
|
||||
EOTXT;
|
||||
|
||||
$this->assertDumpEquals($expectedDump, $var, Caster::EXCLUDE_VERBOSE);
|
||||
$this->assertDumpEquals('Closure&($a = 5) { …6}', $var, Caster::EXCLUDE_VERBOSE);
|
||||
}
|
||||
|
||||
public function testReflectionParameter()
|
||||
|
@ -140,7 +161,7 @@ EOTXT
|
|||
|
||||
$this->assertDumpMatchesFormat(
|
||||
<<<EOTXT
|
||||
Closure {
|
||||
Closure(): int {
|
||||
returnType: "int"
|
||||
class: "Symfony\Component\VarDumper\Tests\Caster\ReflectionCasterTest"
|
||||
this: Symfony\Component\VarDumper\Tests\Caster\ReflectionCasterTest { …}
|
||||
|
|
Reference in a new issue