Skip to content

Commit

Permalink
Added missing deps for composer and fixed the testsuite
Browse files Browse the repository at this point in the history
  • Loading branch information
stof committed Apr 19, 2012
1 parent 2d2c77d commit c417370
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .gitignore
@@ -0,0 +1,4 @@
vendor
composer.phar
composer.lock
phpunit.xml
9 changes: 9 additions & 0 deletions .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
19 changes: 19 additions & 0 deletions Tests/bootstrap.php
@@ -0,0 +1,19 @@
<?php

if (!@include __DIR__ . '/../vendor/.composer/autoload.php') {
die("You must set up the project dependencies, run the following commands:
wget http://getcomposer.org/composer.phar
php composer.phar install
");
}

spl_autoload_register(function($class) {
if (0 === strpos($class, 'Symfony\\Bundle\\MonologBundle')) {
$path = __DIR__.'/../'.implode('/', array_slice(explode('\\', $class), 3)).'.php';
if (!stream_resolve_include_path($path)) {
return false;
}
require_once $path;
return true;
}
});
4 changes: 3 additions & 1 deletion composer.json
Expand Up @@ -17,7 +17,9 @@
],
"require": {
"php": ">=5.3.2",
"symfony/monolog-bridge": "self.version",
"symfony/monolog-bridge": "2.1.*",
"symfony/dependency-injection": "2.1.*",
"symfony/config": "2.1.*",
"monolog/monolog": "1.*"
},
"autoload": {
Expand Down
20 changes: 20 additions & 0 deletions phpunit.xml.dist
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit colors="true" bootstrap="Tests/bootstrap.php">
<testsuites>
<testsuite name="MonologBundle for the Symfony Framework">
<directory>./Tests</directory>
</testsuite>
</testsuites>

<filter>
<whitelist>
<directory>.</directory>
<exclude>
<directory>./Resources</directory>
<directory>./Tests</directory>
<directory>./vendor</directory>
</exclude>
</whitelist>
</filter>
</phpunit>

0 comments on commit c417370

Please sign in to comment.