Browse code

simplified tests as min version if now 5.3.3

Fabien Potencier authored on 16/08/2017 06:30:52
Showing 30 changed files
... ...
@@ -9,7 +9,7 @@
9 9
          processIsolation="false"
10 10
          stopOnFailure="false"
11 11
          syntaxCheck="false"
12
-         bootstrap="test/bootstrap.php"
12
+         bootstrap="vendor/autoload.php"
13 13
 >
14 14
   <testsuites>
15 15
     <testsuite name="Twig Test Suite">
... ...
@@ -9,7 +9,7 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12
-class Twig_Tests_AutoloaderTest extends PHPUnit_Framework_TestCase
12
+class Twig_Tests_AutoloaderTest extends \PHPUnit\Framework\TestCase
13 13
 {
14 14
     /**
15 15
      * @group legacy
... ...
@@ -11,7 +11,7 @@
11 11
 
12 12
 require_once dirname(dirname(__FILE__)).'/FilesystemHelper.php';
13 13
 
14
-class Twig_Tests_Cache_FilesystemTest extends PHPUnit_Framework_TestCase
14
+class Twig_Tests_Cache_FilesystemTest extends \PHPUnit\Framework\TestCase
15 15
 {
16 16
     private $classname;
17 17
     private $directory;
... ...
@@ -9,7 +9,7 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12
-class Twig_Tests_CompilerTest extends PHPUnit_Framework_TestCase
12
+class Twig_Tests_CompilerTest extends \PHPUnit\Framework\TestCase
13 13
 {
14 14
     public function testReprNumericValueWithLocale()
15 15
     {
... ...
@@ -9,7 +9,7 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12
-class Twig_Tests_ContainerRuntimeLoaderTest extends PHPUnit_Framework_TestCase
12
+class Twig_Tests_ContainerRuntimeLoaderTest extends \PHPUnit\Framework\TestCase
13 13
 {
14 14
     /**
15 15
      * @requires PHP 5.3
... ...
@@ -9,7 +9,7 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12
-class CustomExtensionTest extends PHPUnit_Framework_TestCase
12
+class CustomExtensionTest extends \PHPUnit\Framework\TestCase
13 13
 {
14 14
     /**
15 15
      * @requires PHP 5.3
... ...
@@ -11,7 +11,7 @@
11 11
 
12 12
 require_once dirname(__FILE__).'/FilesystemHelper.php';
13 13
 
14
-class Twig_Tests_EnvironmentTest extends PHPUnit_Framework_TestCase
14
+class Twig_Tests_EnvironmentTest extends \PHPUnit\Framework\TestCase
15 15
 {
16 16
     private $deprecations = array();
17 17
 
... ...
@@ -9,7 +9,7 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12
-class Twig_Tests_ErrorTest extends PHPUnit_Framework_TestCase
12
+class Twig_Tests_ErrorTest extends \PHPUnit\Framework\TestCase
13 13
 {
14 14
     public function testErrorWithObjectFilename()
15 15
     {
... ...
@@ -9,7 +9,7 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12
-class Twig_Tests_ExpressionParserTest extends PHPUnit_Framework_TestCase
12
+class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase
13 13
 {
14 14
     /**
15 15
      * @expectedException Twig_Error_Syntax
... ...
@@ -9,7 +9,7 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12
-class Twig_Tests_Extension_CoreTest extends PHPUnit_Framework_TestCase
12
+class Twig_Tests_Extension_CoreTest extends \PHPUnit\Framework\TestCase
13 13
 {
14 14
     /**
15 15
      * @dataProvider getRandomFunctionTestData
... ...
@@ -9,7 +9,7 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12
-class Twig_Tests_Extension_SandboxTest extends PHPUnit_Framework_TestCase
12
+class Twig_Tests_Extension_SandboxTest extends \PHPUnit\Framework\TestCase
13 13
 {
14 14
     protected static $params;
15 15
     protected static $templates;
... ...
@@ -9,7 +9,7 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12
-class Twig_Tests_FactoryRuntimeLoaderTest extends PHPUnit_Framework_TestCase
12
+class Twig_Tests_FactoryRuntimeLoaderTest extends \PHPUnit\Framework\TestCase
13 13
 {
14 14
     public function testLoad()
15 15
     {
... ...
@@ -11,7 +11,7 @@
11 11
 
12 12
 require_once dirname(__FILE__).'/FilesystemHelper.php';
13 13
 
14
-class Twig_Tests_FileCachingTest extends PHPUnit_Framework_TestCase
14
+class Twig_Tests_FileCachingTest extends \PHPUnit\Framework\TestCase
15 15
 {
16 16
     private $env;
17 17
     private $tmpDir;
... ...
@@ -9,7 +9,7 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12
-class Twig_Tests_FileExtensionEscapingStrategyTest extends PHPUnit_Framework_TestCase
12
+class Twig_Tests_FileExtensionEscapingStrategyTest extends \PHPUnit\Framework\TestCase
13 13
 {
14 14
     /**
15 15
      * @dataProvider getGuessData
... ...
@@ -8,7 +8,7 @@
8 8
  * For the full copyright and license information, please view the LICENSE
9 9
  * file that was distributed with this source code.
10 10
  */
11
-class Twig_Tests_LexerTest extends PHPUnit_Framework_TestCase
11
+class Twig_Tests_LexerTest extends \PHPUnit\Framework\TestCase
12 12
 {
13 13
     /**
14 14
      * @group legacy
... ...
@@ -9,7 +9,7 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12
-class Twig_Tests_Loader_ArrayTest extends PHPUnit_Framework_TestCase
12
+class Twig_Tests_Loader_ArrayTest extends \PHPUnit\Framework\TestCase
13 13
 {
14 14
     /**
15 15
      * @group legacy
... ...
@@ -9,7 +9,7 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12
-class Twig_Tests_Loader_ChainTest extends PHPUnit_Framework_TestCase
12
+class Twig_Tests_Loader_ChainTest extends \PHPUnit\Framework\TestCase
13 13
 {
14 14
     /**
15 15
      * @group legacy
... ...
@@ -9,7 +9,7 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12
-class Twig_Tests_Loader_FilesystemTest extends PHPUnit_Framework_TestCase
12
+class Twig_Tests_Loader_FilesystemTest extends \PHPUnit\Framework\TestCase
13 13
 {
14 14
     public function testGetSourceContext()
15 15
     {
... ...
@@ -9,7 +9,7 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12
-class Twig_Tests_NativeExtensionTest extends PHPUnit_Framework_TestCase
12
+class Twig_Tests_NativeExtensionTest extends \PHPUnit\Framework\TestCase
13 13
 {
14 14
     /**
15 15
      * @requires PHP 5.3
... ...
@@ -9,7 +9,7 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12
-class Twig_Tests_Node_Expression_CallTest extends PHPUnit_Framework_TestCase
12
+class Twig_Tests_Node_Expression_CallTest extends \PHPUnit\Framework\TestCase
13 13
 {
14 14
     public function testGetArguments()
15 15
     {
... ...
@@ -8,7 +8,7 @@
8 8
  * For the full copyright and license information, please view the LICENSE
9 9
  * file that was distributed with this source code.
10 10
  */
11
-class Twig_Tests_NodeVisitor_OptimizerTest extends PHPUnit_Framework_TestCase
11
+class Twig_Tests_NodeVisitor_OptimizerTest extends \PHPUnit\Framework\TestCase
12 12
 {
13 13
     public function testRenderBlockOptimizer()
14 14
     {
... ...
@@ -8,7 +8,7 @@
8 8
  * For the full copyright and license information, please view the LICENSE
9 9
  * file that was distributed with this source code.
10 10
  */
11
-class Twig_Tests_ParserTest extends PHPUnit_Framework_TestCase
11
+class Twig_Tests_ParserTest extends \PHPUnit\Framework\TestCase
12 12
 {
13 13
     /**
14 14
      * @expectedException Twig_Error_Syntax
... ...
@@ -9,7 +9,7 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12
-abstract class Twig_Tests_Profiler_Dumper_AbstractTest extends PHPUnit_Framework_TestCase
12
+abstract class Twig_Tests_Profiler_Dumper_AbstractTest extends \PHPUnit\Framework\TestCase
13 13
 {
14 14
     protected function getProfile()
15 15
     {
... ...
@@ -9,7 +9,7 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12
-class Twig_Tests_Profiler_ProfileTest extends PHPUnit_Framework_TestCase
12
+class Twig_Tests_Profiler_ProfileTest extends \PHPUnit\Framework\TestCase
13 13
 {
14 14
     public function testConstructor()
15 15
     {
... ...
@@ -8,7 +8,7 @@
8 8
  * For the full copyright and license information, please view the LICENSE
9 9
  * file that was distributed with this source code.
10 10
  */
11
-class Twig_Tests_TemplateTest extends PHPUnit_Framework_TestCase
11
+class Twig_Tests_TemplateTest extends \PHPUnit\Framework\TestCase
12 12
 {
13 13
     /**
14 14
      * @expectedException LogicException
... ...
@@ -8,7 +8,7 @@
8 8
  * For the full copyright and license information, please view the LICENSE
9 9
  * file that was distributed with this source code.
10 10
  */
11
-class Twig_Tests_TemplateWrapperTest extends PHPUnit_Framework_TestCase
11
+class Twig_Tests_TemplateWrapperTest extends \PHPUnit\Framework\TestCase
12 12
 {
13 13
     public function testHasGetBlocks()
14 14
     {
... ...
@@ -9,7 +9,7 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12
-class Twig_Tests_TokenStreamTest extends PHPUnit_Framework_TestCase
12
+class Twig_Tests_TokenStreamTest extends \PHPUnit\Framework\TestCase
13 13
 {
14 14
     protected static $tokens;
15 15
 
... ...
@@ -9,7 +9,7 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12
-class Twig_Tests_Util_DeprecationCollectorTest extends PHPUnit_Framework_TestCase
12
+class Twig_Tests_Util_DeprecationCollectorTest extends \PHPUnit\Framework\TestCase
13 13
 {
14 14
     /**
15 15
      * @requires PHP 5.3
... ...
@@ -6,7 +6,7 @@
6 6
  * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
7 7
  * @license   http://framework.zend.com/license/new-bsd New BSD License
8 8
  */
9
-class Twig_Test_EscapingTest extends PHPUnit_Framework_TestCase
9
+class Twig_Test_EscapingTest extends \PHPUnit\Framework\TestCase
10 10
 {
11 11
     /**
12 12
      * All character encodings supported by htmlspecialchars().
13 13
deleted file mode 100644
... ...
@@ -1,21 +0,0 @@
1
-<?php
2
-
3
-/*
4
- * This file is part of Twig.
5
- *
6
- * (c) Fabien Potencier
7
- *
8
- * For the full copyright and license information, please view the LICENSE
9
- * file that was distributed with this source code.
10
- */
11
-
12
-if (PHP_VERSION_ID < 50300) {
13
-    require_once dirname(__FILE__).'/../lib/Twig/Autoloader.php';
14
-    Twig_Autoloader::register(true);
15
-} else {
16
-    require __DIR__.'/../vendor/autoload.php';
17
-
18
-    if (!class_exists('\PHPUnit_Framework_TestCase') && class_exists('\PHPUnit\Framework\TestCase')) {
19
-        class_alias('\PHPUnit\Framework\TestCase', '\PHPUnit_Framework_TestCase');
20
-    }
21
-}