I'm trying to run tests on my project, but PHPUnit does not work! I'm trying to run it, via composer ( vendor/bin/phpunit
). However, nothing happens ... I no longer know what to do to make it work. In other projects, everything works normally.
Output
phpunit.xml
<?xmlversion="1.0" encoding="utf-8"?>
<phpunit bootstrap="./vendor/autoload.php" colors="true">
<testsuites>
<testsuite name="Unit Tests">
<directory>./tests</directory>
</testsuite>
</testsuites>
</phpunit>
composer.json
{
"name": "giovanni/magic",
"description": "Magic framework for PHP projects",
"keywords": ["api", "rest", "framework"],
"license": "MIT",
"type": "project",
"minimum-stability": "stable",
"require": {
"php": ">= 7.0",
"altorouter/altorouter": "^1.2",
"filp/whoops": "^2.1",
"illuminate/database": "^5.4",
"bosnadev/repositories": "^0.13.0",
"nesbot/carbon": "^1.22",
"guzzlehttp/guzzle": "^6.3",
"larapack/dd": "^1.1",
"phpmailer/phpmailer": "^6.0"
},
"authors": [
{
"name": "Giovanni Cruz",
"email": "[email protected]"
}
],
"autoload": {
"files": ["./config/errors.php", "./config/database.php", "./config/router.php"],
"psr-4":
{
"App\": "./app",
"App\Models\": "./app/models",
"App\Controllers\": "./app/controllers",
"Kernel\": "./kernel"
}
},
"scripts": {
"serve": [
"php -S localhost:8000 -t ./public"
]
},
"require-dev": {
"phpunit/phpunit": "^6.5"
}
}