Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Support for travis

  • Loading branch information...
commit 8e1a3f09c56663a105954815d218f73ad61fa4ba 1 parent 546a31b
@michelsalib authored
View
9 .gitignore
@@ -1,4 +1,5 @@
-.svn
-/.buildpath
-/.project
-/.settings
+phpunit.xml
+Tests/autoload.php
+
+vendor/*
+!vendor/vendors.php
View
11 .travis.json
@@ -0,0 +1,11 @@
+language: php
+
+php:
+- 5.3
+- 5.4
+
+before_script: php vendor/vendors.php
+
+notifications:
+email:
+- michelsalib@hotmail.com
View
23 Tests/autoload.php.dist
@@ -0,0 +1,23 @@
+<?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', $vendorDir.'/bundles'),
+));
+$loader->register();
+
+spl_autoload_register(function($class) {
+ if (0 === strpos($class, 'BCC\\ExtraToolsBundle\\')) {
+ $path = __DIR__.'/../'.implode('/', array_slice(explode('\\', $class), 2)).'.php';
+ if (!stream_resolve_include_path($path)) {
+ return false;
+ }
+ require_once $path;
+ return true;
+ }
+});
View
7 Tests/bootstrap.php
@@ -0,0 +1,7 @@
+<?php
+
+if (file_exists($file = __DIR__.'/autoload.php')) {
+ require_once $file;
+} elseif (file_exists($file = __DIR__.'/autoload.php.dist')) {
+ require_once $file;
+}
View
42 phpunit.xml.dist
@@ -1,26 +1,16 @@
-<?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="./../../../../app/bootstrap.php.cache"
->
-
- <testsuites>
- <testsuite name="ExtraToolsBundle Test Suite">
- <directory>./Tests</directory>
- </testsuite>
- </testsuites>
-
- <groups>
- <exclude>
- <group>performance</group>
- </exclude>
- </groups>
-</phpunit>
+<?xml version="1.0" encoding="UTF-8"?>
+
+<phpunit bootstrap="./Tests/bootstrap.php" colors="true">
+
+ <testsuites>
+ <testsuite name="BCCExtraTools test suite">
+ <directory suffix="Test.php">./Tests</directory>
+ </testsuite>
+ </testsuites>
+
+ <filter>
+ <whitelist>
+ <directory>./</directory>
+ </whitelist>
+ </filter>
+</phpunit>
View
30 vendor/vendors.php
@@ -0,0 +1,30 @@
+#!/usr/bin/env php
+<?php
+
+set_time_limit(0);
+
+$vendorDir = __DIR__;
+$deps = array(
+ array('symfony', 'git://github.com/symfony/symfony.git', 'origin/master'),
+);
+
+foreach ($deps as $dep) {
+ list($name, $url, $rev) = $dep;
+
+ echo "> Installing/Updating $name\n";
+
+ $installDir = $vendorDir.'/'.$name;
+ if (!is_dir($installDir)) {
+ $return = null;
+ system(sprintf('git clone -q %s %s', escapeshellarg($url), escapeshellarg($installDir)), $return);
+ if ($return > 0) {
+ exit($return);
+ }
+ }
+
+ $return = null;
+ system(sprintf('cd %s && git fetch -q origin && git reset --hard %s', escapeshellarg($installDir), escapeshellarg($rev)), $return);
+ if ($return > 0) {
+ exit($return);
+ }
+}
Please sign in to comment.
Something went wrong with that request. Please try again.