manshu
322
5
Testing

Error while testing PHPUnit.

Posted 1 year ago by manshu

I have updated and then downgraded PHPUnit and it gives me following error. Can anyone help ?

PHP Fatal error:  Class 'PHPUnit_Framework_Constraint' not found in /Users/username/Documents/Code/projects/myapp/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Constraints/HasInDatabase.php on line 8
PHP Fatal error:  Uncaught Illuminate\Contracts\Container\BindingResolutionException: Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable. in /Users/username/Documents/Code/projects/myapp/vendor/laravel/framework/src/Illuminate/Container/Container.php:895
Stack trace:
#0 /Users/username/Documents/Code/projects/myapp/vendor/laravel/framework/src/Illuminate/Container/Container.php(735): Illuminate\Container\Container->notInstantiable('Illuminate\\Cont...')
#1 /Users/username/Documents/Code/projects/myapp/vendor/laravel/framework/src/Illuminate/Container/Container.php(608): Illuminate\Container\Container->build('Illuminate\\Cont...')
#2 /Users/username/Documents/Code/projects/myapp/vendor/laravel/framework/src/Illuminate/Container/Container.php(575): Illuminate\Container\Container->resolve('Illuminate\\Cont...')
#3 /Users/username/Documents/Code/projects/myapp/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(728): Illuminate\Container\Container->make('Illuminate\\Cont...')
#4 /Users/man in /Users/username/Documents/Code/projects/myapp/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 895

Fatal error: Class 'PHPUnit_Framework_Constraint' not found in /Users/username/Documents/Code/projects/myapp/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Constraints/HasInDatabase.php on line 8

Fatal error: Uncaught Illuminate\Contracts\Container\BindingResolutionException: Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable. in /Users/username/Documents/Code/projects/myapp/vendor/laravel/framework/src/Illuminate/Container/Container.php:895
Stack trace:
#0 /Users/username/Documents/Code/projects/myapp/vendor/laravel/framework/src/Illuminate/Container/Container.php(735): Illuminate\Container\Container->notInstantiable('Illuminate\\Cont...')
#1 /Users/username/Documents/Code/projects/myapp/vendor/laravel/framework/src/Illuminate/Container/Container.php(608): Illuminate\Container\Container->build('Illuminate\\Cont...')
#2 /Users/username/Documents/Code/projects/myapp/vendor/laravel/framework/src/Illuminate/Container/Container.php(575): Illuminate\Container\Container->resolve('Illuminate\\Cont...')
#3 /Users/username/Documents/Code/projects/myapp/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(728): Illuminate\Container\Container->make('Illuminate\\Cont...')
#4 /Users/man in /Users/username/Documents/Code/projects/myapp/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 895

Please sign in or create an account to participate in this conversation.