路线
Route::group(array('prefix' => 'api'), function() { Route::resource('test', 'TestController', array('only' => array('index', 'store', 'destroy', 'show', 'update'))); });
调节器
public function store(Request $request) { return response()->json(['status' => true]); }
单元类
public function testBasicExample() { $this->post('api/test')->seeJson(['status' => true]); }
PHPUnit结果:
1) ExampleTest::testBasicExample
路由返回了无效的JSON.
也许是一个例外被抛出?有人看到问题吗?