albertcht / lumen-testing

A testing suite for Lumen like Laravel does.
MIT License
43 stars 24 forks source link

Slight incompatibility with Lumen 5.8 under PHP 7.1, and PHPunit 7.5.18 #12

Open HenkPoley opened 4 years ago

HenkPoley commented 4 years ago

The signature of AlbertCht\Lumen\Testing\Concerns\InteractsWithAuthentication::be($user, $driver = NULL) is not compatible in lumen-testing v1.1 from Packagist.

In TestCase.php line 9:
  Declaration of AlbertCht\Lumen\Testing\Concerns\InteractsWithAuthentication  
  ::be($user, $driver = NULL) should be compatible with Laravel\Lumen\Testing  
  \TestCase::be(Illuminate\Contracts\Auth\Authenticatable $user, $driver = NU  
  LL)     

For ease of reading:

  Declaration of 
AlbertCht\Lumen\Testing\Concerns\InteractsWithAuthentication::be($user, $driver = NULL)
 should be compatible with 
Laravel\Lumen\Testing\TestCase::be(Illuminate\Contracts\Auth\Authenticatable $user, $driver = NU  
  LL)     
HenkPoley commented 4 years ago

I suspect this only triggers when you use Auth in your Lumen API.

HenkPoley commented 3 years ago

It would be nice to roll a v1.1.1 composer package with some of the fixes.

Today I bumped into this again when running tests that made find this bug.