laravel / browser-kit-testing

Provides backwards compatibility for BrowserKit testing in the latest Laravel release.
MIT License
508 stars 75 forks source link

[6.x] Add missing import for CookieValuePrefix #148

Closed CyrilMazur closed 3 years ago

CyrilMazur commented 3 years ago

This PR fixes the usage of the withCookie() / withCookies() methods. See error below:

Class 'Laravel\BrowserKitTesting\Concerns\CookieValuePrefix' not found

  at vendor/laravel/browser-kit-testing/src/Concerns/MakesHttpRequests.php:695
    691|             return array_merge($this->defaultCookies, $this->unencryptedCookies);
    692|         }
    693| 
    694|         return collect($this->defaultCookies)->map(function ($value, $key) {
  > 695|             return encrypt(CookieValuePrefix::create($key, app('encrypter')->getKey()).$value, false);
    696|         })->merge($this->unencryptedCookies)->all();
    697|     }
    698| 
    699|     /**
driesvints commented 3 years ago

Thanks! Will be released on Tuesday.