comparison vendor/symfony/var-dumper/Tests/Caster/ExceptionCasterTest.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 5fb285c0d0e3
children
comparison
equal deleted inserted replaced
16:c2387f117808 17:129ea1e6d783
34 ExceptionCaster::$traceArgs = true; 34 ExceptionCaster::$traceArgs = true;
35 } 35 }
36 36
37 public function testDefaultSettings() 37 public function testDefaultSettings()
38 { 38 {
39 $ref = array('foo'); 39 $ref = ['foo'];
40 $e = $this->getTestException('foo', $ref); 40 $e = $this->getTestException('foo', $ref);
41 41
42 $expectedDump = <<<'EODUMP' 42 $expectedDump = <<<'EODUMP'
43 Exception { 43 Exception {
44 #message: "foo" 44 #message: "foo"
55 Symfony\Component\VarDumper\Tests\Caster\ExceptionCasterTest->testDefaultSettings() {} 55 Symfony\Component\VarDumper\Tests\Caster\ExceptionCasterTest->testDefaultSettings() {}
56 %A 56 %A
57 EODUMP; 57 EODUMP;
58 58
59 $this->assertDumpMatchesFormat($expectedDump, $e); 59 $this->assertDumpMatchesFormat($expectedDump, $e);
60 $this->assertSame(array('foo'), $ref); 60 $this->assertSame(['foo'], $ref);
61 } 61 }
62 62
63 public function testSeek() 63 public function testSeek()
64 { 64 {
65 $e = $this->getTestException(2); 65 $e = $this->getTestException(2);
162 /** 162 /**
163 * @requires function Twig\Template::getSourceContext 163 * @requires function Twig\Template::getSourceContext
164 */ 164 */
165 public function testFrameWithTwig() 165 public function testFrameWithTwig()
166 { 166 {
167 require_once dirname(__DIR__).'/Fixtures/Twig.php'; 167 require_once \dirname(__DIR__).'/Fixtures/Twig.php';
168 168
169 $f = array( 169 $f = [
170 new FrameStub(array( 170 new FrameStub([
171 'file' => dirname(__DIR__).'/Fixtures/Twig.php', 171 'file' => \dirname(__DIR__).'/Fixtures/Twig.php',
172 'line' => 20, 172 'line' => 20,
173 'class' => '__TwigTemplate_VarDumperFixture_u75a09', 173 'class' => '__TwigTemplate_VarDumperFixture_u75a09',
174 )), 174 ]),
175 new FrameStub(array( 175 new FrameStub([
176 'file' => dirname(__DIR__).'/Fixtures/Twig.php', 176 'file' => \dirname(__DIR__).'/Fixtures/Twig.php',
177 'line' => 21, 177 'line' => 21,
178 'class' => '__TwigTemplate_VarDumperFixture_u75a09', 178 'class' => '__TwigTemplate_VarDumperFixture_u75a09',
179 'object' => new \__TwigTemplate_VarDumperFixture_u75a09(null, __FILE__), 179 'object' => new \__TwigTemplate_VarDumperFixture_u75a09(null, __FILE__),
180 )), 180 ]),
181 ); 181 ];
182 182
183 $expectedDump = <<<'EODUMP' 183 $expectedDump = <<<'EODUMP'
184 array:2 [ 184 array:2 [
185 0 => { 185 0 => {
186 class: "__TwigTemplate_VarDumperFixture_u75a09" 186 class: "__TwigTemplate_VarDumperFixture_u75a09"