Yaffs site version 1.1
[yaffs-website] / vendor / symfony / var-dumper / Tests / CliDumperTest.php
index 90045958ae38bea1de339a4f6b13598bc44110bc..5ee3a6c11ed48f9fcd532d7ab93d5892ef5d0895 100644 (file)
@@ -14,6 +14,8 @@ namespace Symfony\Component\VarDumper\Tests;
 use Symfony\Component\VarDumper\Cloner\VarCloner;
 use Symfony\Component\VarDumper\Dumper\CliDumper;
 use Symfony\Component\VarDumper\Test\VarDumperTestCase;
+use Twig\Environment;
+use Twig\Loader\FilesystemLoader;
 
 /**
  * @author Nicolas Grekas <p@tchwork.com>
@@ -45,7 +47,7 @@ class CliDumperTest extends VarDumperTestCase
         $closure54 = '';
         $r = defined('HHVM_VERSION') ? '' : '#%d';
 
-        if (PHP_VERSION_ID >= 50400) {
+        if (\PHP_VERSION_ID >= 50400) {
             $closure54 = <<<EOTXT
 
     class: "Symfony\Component\VarDumper\Tests\CliDumperTest"
@@ -202,14 +204,14 @@ EOTXT
     }
 
     /**
-     * @requires function Twig_Template::getSourceContext
+     * @requires function Twig\Template::getSourceContext
      */
     public function testThrowingCaster()
     {
         $out = fopen('php://memory', 'r+b');
 
         require_once __DIR__.'/Fixtures/Twig.php';
-        $twig = new \__TwigTemplate_VarDumperFixture_u75a09(new \Twig_Environment(new \Twig_Loader_Filesystem()));
+        $twig = new \__TwigTemplate_VarDumperFixture_u75a09(new Environment(new FilesystemLoader()));
 
         $dumper = new CliDumper();
         $dumper->setColors(false);
@@ -225,12 +227,11 @@ EOTXT
             ':stream' => eval('return function () use ($twig) {
                 try {
                     $twig->render(array());
-                } catch (\Twig_Error_Runtime $e) {
+                } catch (\Twig\Error\RuntimeError $e) {
                     throw $e->getPrevious();
                 }
             };'),
         ));
-        $line = __LINE__ - 2;
         $ref = (int) $out;
 
         $data = $cloner->cloneVar($out);
@@ -266,16 +267,16 @@ stream resource {@{$ref}
             """
         }
       }
-      %d. Twig_Template->displayWithErrorHandling() ==> __TwigTemplate_VarDumperFixture_u75a09->doDisplay(): {
+      %d. Twig%cTemplate->displayWithErrorHandling() ==> __TwigTemplate_VarDumperFixture_u75a09->doDisplay(): {
         src: {
           %sTemplate.php:%d: """
             try {\\n
                 \$this->doDisplay(\$context, \$blocks);\\n
-            } catch (Twig_Error \$e) {\\n
+            } catch (Twig%sError \$e) {\\n
             """
         }
       }
-      %d. Twig_Template->display() ==> Twig_Template->displayWithErrorHandling(): {
+      %d. Twig%cTemplate->display() ==> Twig%cTemplate->displayWithErrorHandling(): {
         src: {
           %sTemplate.php:%d: """
             {\\n
@@ -284,7 +285,7 @@ stream resource {@{$ref}
             """
         }
       }
-      %d. Twig_Template->render() ==> Twig_Template->display(): {
+      %d. Twig%cTemplate->render() ==> Twig%cTemplate->display(): {
         src: {
           %sTemplate.php:%d: """
             try {\\n
@@ -293,12 +294,10 @@ stream resource {@{$ref}
             """
         }
       }
-      %d. %slosure%s() ==> Twig_Template->render(): {
+      %d. %slosure%s() ==> Twig%cTemplate->render(): {
         src: {
-          %sCliDumperTest.php:{$line}: """
-                    }\\n
-                };'),\\n
-            ));\\n
+          %sCliDumperTest.php:%d: """
+%A
             """
         }
       }
@@ -419,7 +418,7 @@ EOTXT
      */
     public function testBuggyRefs()
     {
-        if (PHP_VERSION_ID >= 50600) {
+        if (\PHP_VERSION_ID >= 50600) {
             $this->markTestSkipped('PHP 5.6 fixed refs counting');
         }