$this->post ($thread->path ().'/replies',$reply->toArray ()) 不报错?
- 如题,
$this->post($thread->path().'/replies',$reply->toArray())
,中的post动作返回的404、500之类的错误无法被检测到,怎么能抛出post的response错误? - 函数
public function unauthenticated_user_may_no_add_replies() { $this->expectException('Illuminate\Auth\AuthenticationException'); $this->post('threads/1/replies',[]); }
中的expectException跟上下文无关,不加其他语句也会直接抛出异常吧?
- 我的本地环境中倒是不会抛出
Illuminate\Session\TokenMismatchException
,不需要在执行命令前加APP_ENV=testing
推荐文章: