php 7.2.9_1
laravel 5.6.2
nginx 1.15.2
mac 10.13.6 ^_^
phpstorm 2017.1.2
Я изучаю phpunit с laravel, я следую документации phpunit . и когда я читаю @dataprovider
, тогда я хочу попробовать. Так что я набираю код на моем mac, я сталкиваюсь с ошибкой. Я не могу прочитать какое-либо полезное сообщение из журнала. Может кто-нибудь сказать мне, где я делаю ошибку? ТНХ
namepsace Tests\Feature
use Tests\TestCase
class ConventionTest extends TestCase{
/**
* @dataProvider additionProvider
*/
public function testParent($a, $b, $expected)
{
$this->assertEquals($expected, $a + $b);
}
public function additionProvider(){
return [
'adding zeros' => [0, 0, 0],
'zero plus one' => [0, 1, 1],
'one plus zero' => [1, 0, 1],
'one plus one' => [1, 1, 3]
];
}
}
где я бежал phpunit tests/Feature/ConventionTest.php --filter testParent
есть результат:
PHPUnit 7.3.2 by Sebastian Bergmann and contributors.
.
Fatal error: Uncaught Illuminate\Contracts\Container\BindingResolutionException: Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable. in /usr/local/var/www/nginxRoot/com.FromGithub/hestia/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 918
Illuminate\Contracts\Container\BindingResolutionException: Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable. in /usr/local/var/www/nginxRoot/com.FromGithub/hestia/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 918
Call Stack:
1.6248 25745288 1. Illuminate\Foundation\Bootstrap\HandleExceptions->handleException() /usr/local/var/www/nginxRoot/com.FromGithub/hestia/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:0
1.6257 25755464 2. Illuminate\Foundation\Bootstrap\HandleExceptions->renderForConsole() /usr/local/var/www/nginxRoot/com.FromGithub/hestia/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:87
1.6257 25755464 3. Illuminate\Foundation\Bootstrap\HandleExceptions->getExceptionHandler() /usr/local/var/www/nginxRoot/com.FromGithub/hestia/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:101
1.6257 25755464 4. Illuminate\Foundation\Application->make() /usr/local/var/www/nginxRoot/com.FromGithub/hestia/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:159
1.6257 25755464 5. Illuminate\Foundation\Application->make() /usr/local/var/www/nginxRoot/com.FromGithub/hestia/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:741
1.6257 25755464 6. Illuminate\Foundation\Application->resolve() /usr/local/var/www/nginxRoot/com.FromGithub/hestia/vendor/laravel/framework/src/Illuminate/Container/Container.php:586
1.6258 25755464 7. Illuminate\Foundation\Application->build() /usr/local/var/www/nginxRoot/com.FromGithub/hestia/vendor/laravel/framework/src/Illuminate/Container/Container.php:631
1.6258 25755576 8. Illuminate\Foundation\Application->notInstantiable() /usr/local/var/www/nginxRoot/com.FromGithub/hestia/vendor/laravel/framework/src/Illuminate/Container/Container.php:758
Fatal error: Uncaught Illuminate\Contracts\Container\BindingResolutionException: Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable. in /usr/local/var/www/nginxRoot/com.FromGithub/hestia/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 918
Illuminate\Contracts\Container\BindingResolutionException: Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable. in /usr/local/var/www/nginxRoot/com.FromGithub/hestia/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 918
Call Stack:
1.6279 25766896 1. Illuminate\Foundation\Bootstrap\HandleExceptions->handleShutdown() /usr/local/var/www/nginxRoot/com.FromGithub/hestia/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:0
1.6285 25787304 2. Illuminate\Foundation\Bootstrap\HandleExceptions->handleException() /usr/local/var/www/nginxRoot/com.FromGithub/hestia/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:123
1.6286 25795952 3. Illuminate\Foundation\Bootstrap\HandleExceptions->renderForConsole() /usr/local/var/www/nginxRoot/com.FromGithub/hestia/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:87
1.6286 25795952 4. Illuminate\Foundation\Bootstrap\HandleExceptions->getExceptionHandler() /usr/local/var/www/nginxRoot/com.FromGithub/hestia/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:101
1.6286 25795952 5. Illuminate\Foundation\Application->make() /usr/local/var/www/nginxRoot/com.FromGithub/hestia/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:159
1.6286 25795952 6. Illuminate\Foundation\Application->make() /usr/local/var/www/nginxRoot/com.FromGithub/hestia/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:741
1.6286 25795952 7. Illuminate\Foundation\Application->resolve() /usr/local/var/www/nginxRoot/com.FromGithub/hestia/vendor/laravel/framework/src/Illuminate/Container/Container.php:586
1.6287 25795952 8. Illuminate\Foundation\Application->build() /usr/local/var/www/nginxRoot/com.FromGithub/hestia/vendor/laravel/framework/src/Illuminate/Container/Container.php:631
1.6287 25796064 9. Illuminate\Foundation\Application->notInstantiable() /usr/local/var/www/nginxRoot/com.FromGithub/hestia/vendor/laravel/framework/src/Illuminate/Container/Container.php:758