Permalink
Browse files

Switched the testsuite to composer

  • Loading branch information...
1 parent f30fc90 commit 9c69e092db63d21d9c6e22991ae5e5bbaf45c1ac @stof stof committed Jun 19, 2012
Showing with 11 additions and 97 deletions.
  1. +3 −3 .gitignore
  2. +7 −10 .travis.yml
  3. +0 −32 Tests/autoload.php.dist
  4. +0 −16 Tests/bootstrap.php
  5. +1 −1 phpunit.xml.dist
  6. +0 −35 vendor/vendors.php
View
6 .gitignore
@@ -1,4 +1,4 @@
phpunit.xml
-Tests/autoload.php
-
-vendor/symfony
+vendor/
+composer.lock
+composer.phar
View
17 .travis.yml
@@ -1,16 +1,13 @@
language: php
php:
- - 5.3
- - 5.4
+ - 5.3
+ - 5.4
-env:
- - SYMFONY_VERSION=v2.0.12
- - SYMFONY_VERSION=origin/2.0
- - SYMFONY_VERSION=origin/master
-
-before_script: php vendor/vendors.php
+before_script:
+ - curl -s http://getcomposer.org/installer | php
+ - php composer.phar install --dev
notifications:
- email:
- - friendsofsymfony-dev@googlegroups.com
+ email:
+ - friendsofsymfony-dev@googlegroups.com
View
32 Tests/autoload.php.dist
@@ -1,32 +0,0 @@
-<?php
-
-/*
- * This file is part of the FOSAdvancedEncoderBundle package.
- *
- * (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-$vendorDir = __DIR__.'/../vendor';
-require_once $vendorDir.'/symfony/src/Symfony/Component/ClassLoader/UniversalClassLoader.php';
-
-use Symfony\Component\ClassLoader\UniversalClassLoader;
-
-$loader = new UniversalClassLoader();
-$loader->registerNamespaces(array(
- 'Symfony' => $vendorDir.'/symfony/src',
-));
-$loader->register();
-
-spl_autoload_register(function($class) {
- if (0 === strpos($class, 'FOS\\AdvancedEncoderBundle\\')) {
- $path = __DIR__.'/../'.implode('/', array_slice(explode('\\', $class), 2)).'.php';
- if (!stream_resolve_include_path($path)) {
- return false;
- }
- require_once $path;
- return true;
- }
-});
View
16 Tests/bootstrap.php
@@ -1,16 +0,0 @@
-<?php
-
-/*
- * This file is part of the FOSAdvancedEncoderBundle package.
- *
- * (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-if (file_exists($file = __DIR__.'/autoload.php')) {
- require_once $file;
-} elseif (file_exists($file = __DIR__.'/autoload.php.dist')) {
- require_once $file;
-}
View
2 phpunit.xml.dist
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<phpunit bootstrap="./Tests/bootstrap.php" colors="true">
+<phpunit bootstrap="vendor/autoload.php" colors="true">
<testsuites>
<testsuite name="FOSAdvancedEncoderBundle">
<directory suffix="Test.php">./Tests</directory>
View
35 vendor/vendors.php
@@ -1,35 +0,0 @@
-#!/usr/bin/env php
-<?php
-
-/*
- * This file is part of the FOSAdvancedEncoderBundle package.
- *
- * (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-set_time_limit(0);
-
-if (isset($argv[1])) {
- $_SERVER['SYMFONY_VERSION'] = $argv[1];
-}
-
-$vendorDir = __DIR__;
-$deps = array(
- array('symfony', 'http://github.com/symfony/symfony', isset($_SERVER['SYMFONY_VERSION']) ? $_SERVER['SYMFONY_VERSION'] : 'origin/master'),
-);
-
-foreach ($deps as $dep) {
- list($name, $url, $rev) = $dep;
-
- echo "> Installing/Updating $name\n";
-
- $installDir = $vendorDir.'/'.$name;
- if (!is_dir($installDir)) {
- system(sprintf('git clone -q %s %s', escapeshellarg($url), escapeshellarg($installDir)));
- }
-
- system(sprintf('cd %s && git fetch -q origin && git reset --hard %s', escapeshellarg($installDir), escapeshellarg($rev)));
-}

0 comments on commit 9c69e09

Please sign in to comment.