Skip to content

Commit 128e2cb

Browse files
committed
More travis fixes
1 parent e8c5616 commit 128e2cb

File tree

4 files changed

+67
-5
lines changed

4 files changed

+67
-5
lines changed

.travis.yml

+6-5
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ php:
44
# - 5.4
55

66
env:
7-
- SYMFONY_VERSION=v2.0.0
8-
- SYMFONY_VERSION=v2.0.1
7+
#- SYMFONY_VERSION=v2.0.0
8+
#- SYMFONY_VERSION=v2.0.1
99
# - SYMFONY_VERSION=v2.0.2 # broken tag
10-
- SYMFONY_VERSION=v2.0.3
11-
- SYMFONY_VERSION=v2.0.4
12-
- SYMFONY_VERSION=v2.0.5
10+
#- SYMFONY_VERSION=v2.0.3
11+
#- SYMFONY_VERSION=v2.0.4
12+
#- SYMFONY_VERSION=v2.0.5
13+
- SYMFONY_VERSION=v2.0.6
1314
- SYMFONY_VERSION=origin/master
1415

1516
before_script: php Tests/tests/vendors.php

Tests/tests/autoload.php.dist

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
3+
$vendorDir = __DIR__.'/../../vendor';
4+
require_once $vendorDir.'/symfony/src/Symfony/Component/ClassLoader/UniversalClassLoader.php';
5+
6+
use Symfony\Component\ClassLoader\UniversalClassLoader;
7+
8+
$loader = new UniversalClassLoader();
9+
$loader->registerNamespaces(array(
10+
'Symfony' => array($vendorDir.'/symfony/src'),
11+
'Knp' => array($vendorDir.'/knpmenu/src'),
12+
));
13+
$loader->register();
14+
15+
spl_autoload_register(function($class) {
16+
if (0 === strpos($class, 'Mopa\\BootstrapBundle\\')) {
17+
$path = __DIR__.'/../../'.implode('/', array_slice(explode('\\', $class), 2)).'.php';
18+
19+
if (!stream_resolve_include_path($path)) {
20+
return false;
21+
}
22+
require_once $path;
23+
return true;
24+
}
25+
});

Tests/tests/bootstrap.php

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
/*
4+
* this file is part of the symfony package.
5+
*
6+
* (c) fabien potencier <[email protected]>
7+
*
8+
* for the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
if (file_exists($file = __DIR__.'/autoload.php')) {
13+
require_once $file;
14+
} elseif (file_exists($file = __DIR__.'/autoload.php.dist')) {
15+
require_once $file;
16+
}

phpunit.xml.dist

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<phpunit backupGlobals="false"
4+
backupStaticAttributes="false"
5+
colors="true"
6+
convertErrorsToExceptions="true"
7+
convertNoticesToExceptions="true"
8+
convertWarningsToExceptions="true"
9+
processIsolation="false"
10+
stopOnFailure="false"
11+
syntaxCheck="false"
12+
bootstrap="Tests/tests/bootstrap.php"
13+
>
14+
<testsuites>
15+
<testsuite name="Bootstrap Test Suite">
16+
<directory>./Tests/</directory>
17+
</testsuite>
18+
</testsuites>
19+
20+
</phpunit>

0 commit comments

Comments
 (0)