Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixes travis integration, makes tests easier to run

  • Loading branch information...
commit ff29b3dddeb802790ffce506a35e7423bd45a1b2 1 parent 63bfca3
@schmittjoh authored
View
4 .gitignore
@@ -0,0 +1,4 @@
+phpunit.xml
+composer.lock
+vendor/
+
View
9 .travis.yml
@@ -0,0 +1,9 @@
+language: php
+
+php:
+ - 5.3
+ - 5.4
+
+before_script:
+ - curl -s http://getcomposer.org/installer | php
+ - php composer.phar install --dev
View
6 README.md
@@ -1,5 +1,5 @@
-JMSI18nRoutingBundle
-===================
+JMSI18nRoutingBundle [![Build Status](https://secure.travis-ci.org/schmittjoh/JMSI18nRoutingBundle.png?branch=master)](http://travis-ci.org/schmittjoh/JMSI18nRoutingBundle)
+====================
Documentation:
[Resources/doc](http://jmsyst.com/bundles/JMSI18nRoutingBundle)
@@ -10,4 +10,4 @@ Code License:
Documentation License:
-[Resources/doc/LICENSE](https://github.com/schmittjoh/JMSI18nRoutingBundle/blob/master/Resources/doc/LICENSE)
+[Resources/doc/LICENSE](https://github.com/schmittjoh/JMSI18nRoutingBundle/blob/master/Resources/doc/LICENSE)
View
33 Tests/bootstrap.php
@@ -1,31 +1,12 @@
<?php
-spl_autoload_register(function($class) {
- if (0 !== strpos($class, 'JMS\I18nRoutingBundle')) {
- return;
- }
-
- if (is_file($path = dirname(__DIR__).str_replace('\\', '/', substr($class, strlen('JMS\I18nRoutingBundle'))).'.php')) {
- require_once $path;
- }
-});
+use Doctrine\Common\Annotations\AnnotationRegistry;
-if (isset($_SERVER['autoload_file'])) {
- require_once $_SERVER['autoload_file'];
-
- return;
-}
-
-// this file searches for the autoload file of your project, and includes it
-$dir = __DIR__;
-$lastDir = null;
-while (($dir = dirname($dir)) && $dir !== $lastDir) {
- $lastDir = $dir;
-
- if (file_exists($file = $dir.'/app/autoload.php')) {
- require_once $file;
- return;
+call_user_func(function() {
+ if ( ! is_file($autoloadFile = __DIR__.'/../vendor/autoload.php')) {
+ throw new \RuntimeException('Could not find vendor/autoload.php. Did you run "composer install --dev"?');
}
-}
-throw new RuntimeException('Could not locate the project\'s autoload.php. If your bundle is not inside a project, you need to replace this bootstrap file.');
+ $loader = require $autoloadFile;
+ AnnotationRegistry::registerLoader(array($loader, 'loadClass'));
+});
View
15 composer.json
@@ -11,10 +11,25 @@
"email": "schmittjoh@gmail.com"
}
],
+ "minimum-stability": "dev",
"require": {
"symfony/framework-bundle": "2.*",
"jms/translation-bundle": "*"
},
+ "require-dev": {
+ "symfony/css-selector": "2.*",
+ "symfony/http-kernel": "2.*",
+ "symfony/validator": "2.*",
+ "symfony/browser-kit": "2.*",
+ "symfony/finder": "2.*",
+ "symfony/form": "2.*",
+ "symfony/yaml": "2.*",
+ "symfony/process": "2.*",
+ "symfony/class-loader": "2.*",
+ "symfony/twig-bundle": "2.*",
+ "sensio/framework-extra-bundle": "*",
+ "jms/di-extra-bundle": "*"
+ },
"autoload": {
"psr-0": { "JMS\\I18nRoutingBundle": "" }
},
Please sign in to comment.
Something went wrong with that request. Please try again.