File tree Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 66use Illuminate \Contracts \Auth \PasswordBroker ;
77use Illuminate \Foundation \Testing \DatabaseMigrations ;
88use Illuminate \Support \Facades \Auth ;
9+ use Illuminate \Support \Facades \Http ;
910use Illuminate \Support \Facades \Notification ;
1011use Illuminate \Support \HtmlString ;
1112use Tests \TestCase ;
211212 // Insert a password reset token into the database.
212213 $ token = $ this ->app [PasswordBroker::class]->getRepository ()->create ($ user );
213214
215+ // Http::fake([
216+ // 'api.pwnedpasswords.com/*' => Http::response('password:3600895'),
217+ // ]);
218+
214219 $ response = $ this ->post ('/password/reset ' , [
215220 'token ' => $ token ,
216221 'email ' => 'john@example.com ' ,
Original file line number Diff line number Diff line change 55use Illuminate \Foundation \Testing \DatabaseMigrations ;
66use Illuminate \Support \Facades \Auth ;
77use Illuminate \Support \Facades \Hash ;
8+ use Illuminate \Support \Facades \Http ;
89use Tests \TestCase ;
910
1011uses (TestCase::class);
109110test ('users cannot update their password when it has been compromised in data leaks ' , function () {
110111 $ user = $ this ->login ();
111112
113+ // Http::fake([
114+ // 'api.pwnedpasswords.com/*' => Http::response('newpassword:3600895'),
115+ // ]);
116+
112117 $ response = $ this ->actingAs ($ user )
113118 ->put ('settings/password ' , [
114119 'current_password ' => 'password ' ,
Original file line number Diff line number Diff line change 11<?php
22
3+ use Illuminate \Support \Facades \Http ;
4+
35/*
46|--------------------------------------------------------------------------
57| Test Case
1315
1416/** @link https://pestphp.com/docs/underlying-test-case */
1517
18+ // pest()->beforeEach(function () {
19+ // Http::preventStrayRequests();
20+ // })->in('Feature', 'Integration');
21+
1622/*
1723|--------------------------------------------------------------------------
1824| Expectations
You can’t perform that action at this time.
0 commit comments