Mercurial > hg > isophonics-drupal-site
diff vendor/symfony/var-dumper/Tests/Caster/ReflectionCasterTest.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 7a779792577d |
children | af1871eacc83 |
line wrap: on
line diff
--- a/vendor/symfony/var-dumper/Tests/Caster/ReflectionCasterTest.php Tue Jul 10 15:07:59 2018 +0100 +++ b/vendor/symfony/var-dumper/Tests/Caster/ReflectionCasterTest.php Thu Feb 28 13:21:36 2019 +0000 @@ -85,6 +85,34 @@ ); } + public function testFromCallableClosureCaster() + { + if (\defined('HHVM_VERSION_ID')) { + $this->markTestSkipped('Not for HHVM.'); + } + $var = [ + (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 () {}; @@ -163,7 +191,7 @@ */ public function testGenerator() { - if (extension_loaded('xdebug')) { + if (\extension_loaded('xdebug')) { $this->markTestSkipped('xdebug is active'); } @@ -223,7 +251,7 @@ EODUMP; $r = new \ReflectionGenerator($generator); - $this->assertDumpMatchesFormat($expectedDump, array($r, $r->getExecutingGenerator())); + $this->assertDumpMatchesFormat($expectedDump, [$r, $r->getExecutingGenerator()]); foreach ($generator as $v) { }