1
我正在使用Laravel的Cashier進行計費,這非常棒。我試圖保持良好狀態並保持我的代碼測試結果,但我無法「僞裝」訂閱的用戶。Laravel Cashier假冒用戶訂購測試
我已經試過:
$user = App\Models\User::create([
'first_name' => $this->faker->firstName,
'last_name' => $this->faker->lastName,
'email' => $this->faker->email,
'password' => 'password1234',
'stripe_plan' => 'name_of_plan',
'stripe_active' => 1
]);
$this->be($user);
但是,如果我再檢查$user->onPlan('name_of_plan')
我得到false
:(
有沒有辦法做到這一點我敢肯定,你可以欣賞我不?我真的想啓動支付系統,直到我有測試支持它!
天才!非常感謝。 – 2015-04-05 17:28:29