歡迎您光臨本站 註冊首頁

Laravel 7.5 發布

←手機掃碼閱讀     admin @ 2020-04-11 , reply:0

Laravel 7.5 發布了,主要更新內容包括:

新的 Http 客戶端斷言 

新版本帶來了 Http 客戶端的兩種新測試方法: 


 Http::assertNotSent(
 function
  
 ($request)
  
 {
     
 return
  $request->hasHeader(
 'X-First'
 , 
 'foo'
 ) &&
            $request->url() == 
 'http://test.com/users'
  &&
            $request[
 'name'
 ] == 
 'Taylor'
  &&
            $request[
 'role'
 ] == 
 'Developer'
 ;
 });
 
 Http::assertNothingSent();
 

assertNotSent()  會返回一個布爾條件,其中包含需要匹配請求的約束。

Added

  • 新增 assertNotSent() 和 assertNothingSent() 方法到 Illuminate\Http\Client\Factory (#32197)
  • 新增對 renameColumn() 的枚舉支持 (#32205)
  • 支持返回 caster 實例 (#32225)

更多詳情見更新說明:

https://laravel-news.com/laravel-7-5-released


[admin ]

來源:OsChina
連結:https://www.oschina.net/news/114796/laravel-7-5-released
Laravel 7.5 發布已經有163次圍觀

http://coctec.com/news/all/show-post-229777.html