run test suit using composer autoload

Other improvements:
 - Move phpunit.xml to phpunit.xml.dist
 - Remove deprecated Tests/bootstrap.php
This commit is contained in:
Eloi Poch 2014-01-08 20:38:39 +01:00 committed by Dominik Liebler
parent 00f1503a44
commit accd7c7ecf
2 changed files with 2 additions and 10 deletions

View File

@ -1,8 +0,0 @@
<?php
spl_autoload_register(function ($class) {
if (preg_match('#^DesignPatterns\\\\(.+)$#', $class, $ret)) {
$relPath = str_replace('\\', DIRECTORY_SEPARATOR, $ret[1]);
require_once dirname(__DIR__) . DIRECTORY_SEPARATOR . $relPath . '.php';
}
});

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="Tests/bootstrap.php" colors="true">
<phpunit bootstrap="./vendor/autoload.php" colors="true">
<testsuites>
<testsuite name="Design Patterns tests">
<testsuite name="Design Patterns">
<directory>./Tests</directory>
</testsuite>
</testsuites>