8000 [Request] Forward compatibility for PHPUnit 5 · Issue #10829 · laravel/framework · GitHub
[go: up one dir, main page]

Skip to content

[Request] Forward compatibility for PHPUnit 5 #10829

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
8000 shehi opened this issue Nov 6, 2015 · 4 comments
Closed

[Request] Forward compatibility for PHPUnit 5 #10829

shehi opened this issue Nov 6, 2015 · 4 comments
Labels

Comments

@shehi
Copy link
Contributor
shehi commented Nov 6, 2015

Unit-tests created for PHPUnit 4 generally work in v5, but I experienced problems in context of Binding and Resolution of providers. Example would be:

My app utilizes Cartalyst/Sentinel package and I use it via app('sentinel') initiator. Whenever unit-test works flawlessly, nothing wrong happens. But the moment you have counter-assertion (failing assertion) in tests, an exception similar to this happens:

Stack trace: 
#0 /home/shehi/Projects/Basis/vendor/laravel/framework/src/Illuminate/Container/Container.php(627): Illuminate\Container\Container->build('Illuminate\Cont...', Array)
#1 /home/shehi/Projects/Basis/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(674): Illuminate\Container\Container->make('Illuminate\Cont...', Array)
#2 /home/shehi/Projects/Basis/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(154): Illuminate\Foundation\Application->make('Illuminate\Cont...')
#3 /home/shehi/Projects/Basis/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(79): Illuminate\Foundation\Bootstrap\HandleExceptions->getExceptionHandler()
#4 [internal function]: Illuminate\Fo' in /home/shehi/Projects/Basis/vendor/laravel/framework/src/Illuminate/Container/Container.php:745

Stack trace: 
#0 /home/shehi/Projects/Basis/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(133): Symfony\Component\Debug\Exception\FatalErrorException->__construct()
#1 /home/shehi/Projects/Basis/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(118): Illuminate\Foundation\Bootstrap\HandleExceptions->fatalExceptionFromError()
#2 /home/shehi/Projects/Basis/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(0): Illuminate\Foundation\Bootstrap\HandleExceptions->handleShutdown() #3 {main} [] []```

This exception, by the looks of it, has nothing to do with actual test, as when I downgrade, real assertion errors show up. Also notice in TRACE after #4, it somehow gets concatenated and new trace starts. Kinda weird as an internal function trace pops up there :) 

My project in question is: http://github.com/AudithSoftworks/Basis

In any way, I recommend thorough testing of PHPUnit 5 for upcoming Laravel release, including service container, bindings and resolutions scopes especially for cases of failing-assertions.
@sebastianbergmann
Copy link

Maybe related to #10808?

@shehi
Copy link
Contributor Author
shehi AE96 commented Nov 6, 2015

Closed in favor of #10808. Thanks @sebastianbergmann

@shehi shehi reopened this Feb 27, 2016
@shehi
Copy link
Contributor Author
shehi commented Feb 27, 2016

@taylorotwell can you confirm that my case is related to #10808? In either case though, are there any possible solutions for this?

@GrahamCampbell
Copy link
Member

We can continue everything on #10808 then. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants
0