Permalink
Browse files

More travis fixes

  • Loading branch information...
1 parent e8c5616 commit 128e2cb1e8b8ceecc50b3b7a9413ebdf6daccc6a @phiamo committed Nov 23, 2011
Showing with 67 additions and 5 deletions.
  1. +6 −5 .travis.yml
  2. +25 −0 Tests/tests/autoload.php.dist
  3. +16 −0 Tests/tests/bootstrap.php
  4. +20 −0 phpunit.xml.dist
View
@@ -4,12 +4,13 @@ php:
# - 5.4
env:
- - SYMFONY_VERSION=v2.0.0
- - SYMFONY_VERSION=v2.0.1
+ #- 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=v2.0.3
+ #- SYMFONY_VERSION=v2.0.4
+ #- SYMFONY_VERSION=v2.0.5
+ - SYMFONY_VERSION=v2.0.6
- SYMFONY_VERSION=origin/master
before_script: php Tests/tests/vendors.php
@@ -0,0 +1,25 @@
+<?php
+
+$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' => array($vendorDir.'/symfony/src'),
+ 'Knp' => array($vendorDir.'/knpmenu/src'),
+));
+$loader->register();
+
+spl_autoload_register(function($class) {
+ if (0 === strpos($class, 'Mopa\\BootstrapBundle\\')) {
+ $path = __DIR__.'/../../'.implode('/', array_slice(explode('\\', $class), 2)).'.php';
+
+ if (!stream_resolve_include_path($path)) {
+ return false;
+ }
+ require_once $path;
+ return true;
+ }
+});
View
@@ -0,0 +1,16 @@
+<?php
+
+/*
+ * this file is part of the symfony package.
+ *
+ * (c) fabien potencier <fabien.potencier@symfony-project.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
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<phpunit backupGlobals="false"
+ backupStaticAttributes="false"
+ colors="true"
+ convertErrorsToExceptions="true"
+ convertNoticesToExceptions="true"
+ convertWarningsToExceptions="true"
+ processIsolation="false"
+ stopOnFailure="false"
+ syntaxCheck="false"
+ bootstrap="Tests/tests/bootstrap.php"
+>
+ <testsuites>
+ <testsuite name="Bootstrap Test Suite">
+ <directory>./Tests/</directory>
+ </testsuite>
+ </testsuites>
+
+</phpunit>

0 comments on commit 128e2cb

Please sign in to comment.