Reorganize Tests

This commit is contained in:
PJ Dietz 2020-08-15 10:11:06 -04:00
parent 5ba8771e93
commit 79d23e37a4
32 changed files with 23 additions and 16 deletions

10
.gitattributes vendored
View File

@ -4,10 +4,12 @@
/.php_cs* export-ignore
/.travis.yml export-ignore
/composer.lock export-ignore
/coverage export-ignore
/docker export-ignore
/docker-compose.yml export-ignore
/docker-compose* export-ignore
/docs export-ignore
/test export-ignore
/phpunit.xml.dist export-ignore
/psalm.xnk export-ignore
/tests export-ignore
/phpunit.xml* export-ignore
/psalm.xml export-ignore
/public export-ignore
/vendor export-ignore

1
.gitignore vendored
View File

@ -27,3 +27,4 @@ notes
# Local overrides
.env
docker-compose.override.yml
phpunit.xml

View File

@ -3,7 +3,7 @@
$finder = PhpCsFixer\Finder::create()
->files()
->in(__DIR__ . '/src')
->in(__DIR__ . '/test');
->in(__DIR__ . '/tests');
return PhpCsFixer\Config::create()
->setFinder($finder)

View File

@ -30,9 +30,8 @@
},
"autoload-dev": {
"psr-4": {
"WellRESTed\\": "test/tests/unit/",
"WellRESTed\\Test\\": "test/src/",
"WellRESTed\\Test\\Integration\\": "test/tests/integration/"
"WellRESTed\\": "tests",
"WellRESTed\\Test\\": "tests"
}
}
}

View File

@ -13,6 +13,11 @@ server {
try_files $uri $uri/ /index.php?$args;
}
# Generated Code Coverage Report
location /coverage {
alias /usr/local/src/wellrested/coverage;
}
# Generated Documentation
location /docs {
alias /usr/local/src/wellrested/docs/build/html;

View File

@ -14,15 +14,12 @@
<directory suffix=".php">./src</directory>
</include>
<report>
<html outputDirectory="./public/coverage"/>
<html outputDirectory="./coverage"/>
</report>
</coverage>
<testsuites>
<testsuite name="unit">
<directory>./test/tests/unit</directory>
</testsuite>
<testsuite name="integration">
<directory>./test/tests/integration</directory>
<directory>./tests</directory>
</testsuite>
</testsuites>
<logging/>

View File

@ -1,6 +1,6 @@
<?php
namespace WellRESTed\Test\Integration;
namespace WellRESTed\Routing;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
@ -13,7 +13,10 @@ use WellRESTed\Server;
use WellRESTed\Test\TestCase;
use WellRESTed\Transmission\TransmitterInterface;
/** @coversNothing */
/**
* Integration test for Routing components
* @coversNothing
*/
class RoutingTest extends TestCase
{
/** @var Server */