Auth seems to have no method called attempt
, here is my code, im using codeception unit test with cest:
use Illuminate\Support\Facades\Session;
use Illuminate\Support\Facades\Auth;
use Illuminate\Routing\Controller;
class ReportCest
{
protected $valid_email = 'email@gmail.com';
protected $valid_password = 'pass';
public function _before(UnitTester $I)
{
Auth::attempt(['email' => $this->valid_email, 'password' => $this->valid_password]);
}
}
In the Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers.php used:
$this->auth->attempt($credentials, $request->has('remember')
i wonder how could i implement it like this
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire