diff --git a/src/Symfony/Component/VarDumper/Tests/Caster/ExceptionCasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/ExceptionCasterTest.php index 3f6a2e8ec3ff1..4e1e3682dc9f3 100644 --- a/src/Symfony/Component/VarDumper/Tests/Caster/ExceptionCasterTest.php +++ b/src/Symfony/Component/VarDumper/Tests/Caster/ExceptionCasterTest.php @@ -12,6 +12,7 @@ namespace Symfony\Component\VarDumper\Tests\Caster; use PHPUnit\Framework\TestCase; +use Symfony\Component\VarDumper\Caster\Caster; use Symfony\Component\VarDumper\Caster\ExceptionCaster; use Symfony\Component\VarDumper\Caster\FrameStub; use Symfony\Component\VarDumper\Cloner\VarCloner; @@ -43,9 +44,9 @@ public function testDefaultSettings() #message: "foo" #code: 0 #file: "%sExceptionCasterTest.php" - #line: 27 + #line: 28 trace: { - %sExceptionCasterTest.php:27: { + %sExceptionCasterTest.php:28: { : { : return new \Exception(''.$msg); : } @@ -72,7 +73,7 @@ public function testSeek() $expectedDump = <<<'EODUMP' { - %sExceptionCasterTest.php:27: { + %sExceptionCasterTest.php:28: { : { : return new \Exception(''.$msg); : } @@ -101,9 +102,9 @@ public function testNoArgs() #message: "1" #code: 0 #file: "%sExceptionCasterTest.php" - #line: 27 + #line: 28 trace: { - %sExceptionCasterTest.php:27: { + %sExceptionCasterTest.php:28: { : { : return new \Exception(''.$msg); : } @@ -129,9 +130,9 @@ public function testNoSrcContext() #message: "1" #code: 0 #file: "%sExceptionCasterTest.php" - #line: 27 + #line: 28 trace: { - %sExceptionCasterTest.php: 27 + %sExceptionCasterTest.php: 28 %sExceptionCasterTest.php: %d %A EODUMP; @@ -157,10 +158,10 @@ public function testHtmlDump() #code: 0 #file: "%s%eVarDumper%eTests%eCaster%eExceptionCasterTest.php" - #line: 27 + #line: 28 trace: { %s%eVarDumper%eTests%eCaster%eExceptionCasterTest.php: 27 +Stack level %d.">%s%eVarDumper%eTests%eCaster%eExceptionCasterTest.php: 28 …%d } } @@ -222,4 +223,20 @@ class: "__TwigTemplate_VarDumperFixture_u75a09" $this->assertDumpMatchesFormat($expectedDump, $f); } + + public function testExcludeVerbosity() + { + $e = $this->getTestException('foo'); + + $expectedDump = <<<'EODUMP' +Exception { + #message: "foo" + #code: 0 + #file: "%sExceptionCasterTest.php" + #line: 28 +} +EODUMP; + + $this->assertDumpMatchesFormat($expectedDump, $e, Caster::EXCLUDE_VERBOSE); + } } pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy