我正在测试测试中的保存数据功能,但是当我运行测试代码时,它显示此错误
1) Tests\Unit\UserTest::testStore
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'http://localhost/user'
+'http://localhost'
这是我的考试:
$response = $this->withoutMiddleware();
$createUser = [
'_token' => 'jhjuiuswktHPyZOvreZDwhcX32XfwvL1onFKm',
'name' => 'john',
'email' => 'john@gmail.com',
'password' => 'randomstring',
'confirm_password' => 'randomstring',
];
$response = $this->post('/user/store', $createUser)->assertLocation('/user');