Browse Source

[Test] Tweak test

Thomas Rabaix 13 years ago
parent
commit
3b04674931
3 changed files with 17 additions and 6 deletions
  1. 13 1
      .travis.yml
  2. 1 1
      Tests/tests/autoload.php.dist
  3. 3 4
      Tests/tests/vendors.php

+ 13 - 1
.travis.yml

@@ -1,4 +1,16 @@
 language: php
-php: 5.3.8
+php:
+  - 5.3
+  # - 5.4
+  
+env:
+  - SYMFONY_VERSION=v2.0.0
+  - SYMFONY_VERSION=v2.0.1
+  # - SYMFONY_VERSION=v2.0.2 # broken tag
+  - SYMFONY_VERSION=v2.0.3
+  - SYMFONY_VERSION=v2.0.4
+  - SYMFONY_VERSION=v2.0.5
+  - SYMFONY_VERSION=origin/master
+
 before_script: php Tests/tests/vendors.php
 script: phpunit

+ 1 - 1
Tests/tests/autoload.php.dist

@@ -8,7 +8,7 @@ use Symfony\Component\ClassLoader\UniversalClassLoader;
 $loader = new UniversalClassLoader();
 $loader->registerNamespaces(array(
     'Symfony'  => array($vendorDir.'/symfony/src'),
-    'Knp'  => array($vendorDir.'/knpmenu/src'),
+    'Knp'      => array($vendorDir.'/knpmenu/src'),
 ));
 $loader->register();
 

+ 3 - 4
Tests/tests/vendors.php

@@ -3,15 +3,14 @@
 
 set_time_limit(0);
 
-
 $vendorDir = __DIR__.'/../../vendor';
 if (!is_dir($vendorDir)) {
   mkdir($vendorDir);
 }
 
 $deps = array(
-    array('symfony', 'git://github.com/symfony/symfony.git', 'v2.0.5'),
-    array('knpmenu', 'git://github.com/knplabs/KnpMenu.git', 'master')
+    array('symfony', 'git://github.com/symfony/symfony.git', isset($_SERVER['SYMFONY_VERSION']) ? $_SERVER['SYMFONY_VERSION'] : 'origin/master'),
+    array('knpmenu', 'git://github.com/knplabs/KnpMenu.git', 'origin/master')
 );
 
 foreach ($deps as $dep) {
@@ -21,7 +20,7 @@ foreach ($deps as $dep) {
 
     $installDir = $vendorDir.'/'.$name;
     if (!is_dir($installDir)) {
-        system(sprintf('git clone %s %s', escapeshellarg($url), escapeshellarg($installDir)));
+        system(sprintf('git clone --quiet %s %s', escapeshellarg($url), escapeshellarg($installDir)));
     }
 
     system(sprintf('cd %s && git fetch origin && git reset --hard %s', escapeshellarg($installDir), escapeshellarg($rev)));