mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-06 06:57:25 +02:00
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:
committed by
Dominik Liebler
parent
00f1503a44
commit
accd7c7ecf
@@ -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';
|
|
||||||
}
|
|
||||||
});
|
|
@@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<phpunit bootstrap="Tests/bootstrap.php" colors="true">
|
<phpunit bootstrap="./vendor/autoload.php" colors="true">
|
||||||
|
|
||||||
<testsuites>
|
<testsuites>
|
||||||
<testsuite name="Design Patterns tests">
|
<testsuite name="Design Patterns">
|
||||||
<directory>./Tests</directory>
|
<directory>./Tests</directory>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
</testsuites>
|
</testsuites>
|
Reference in New Issue
Block a user