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 6
6
use Illuminate \Contracts \Auth \PasswordBroker ;
7
7
use Illuminate \Foundation \Testing \DatabaseMigrations ;
8
8
use Illuminate \Support \Facades \Auth ;
9
+ use Illuminate \Support \Facades \Http ;
9
10
use Illuminate \Support \Facades \Notification ;
10
11
use Illuminate \Support \HtmlString ;
11
12
use Tests \TestCase ;
211
212
// Insert a password reset token into the database.
212
213
$ token = $ this ->app [PasswordBroker::class]->getRepository ()->create ($ user );
213
214
215
+ // Http::fake([
216
+ // 'api.pwnedpasswords.com/*' => Http::response('password:3600895'),
217
+ // ]);
218
+
214
219
$ response = $ this ->post ('/password/reset ' , [
215
220
'token ' => $ token ,
216
221
Original file line number Diff line number Diff line change 5
5
use Illuminate \Foundation \Testing \DatabaseMigrations ;
6
6
use Illuminate \Support \Facades \Auth ;
7
7
use Illuminate \Support \Facades \Hash ;
8
+ use Illuminate \Support \Facades \Http ;
8
9
use Tests \TestCase ;
9
10
10
11
uses (TestCase::class);
109
110
test ('users cannot update their password when it has been compromised in data leaks ' , function () {
110
111
$ user = $ this ->login ();
111
112
113
+ // Http::fake([
114
+ // 'api.pwnedpasswords.com/*' => Http::response('newpassword:3600895'),
115
+ // ]);
116
+
112
117
$ response = $ this ->actingAs ($ user )
113
118
->put ('settings/password ' , [
114
119
'current_password ' => 'password ' ,
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
+ use Illuminate \Support \Facades \Http ;
4
+
3
5
/*
4
6
|--------------------------------------------------------------------------
5
7
| Test Case
13
15
14
16
/** @link https://pestphp.com/docs/underlying-test-case */
15
17
18
+ // pest()->beforeEach(function () {
19
+ // Http::preventStrayRequests();
20
+ // })->in('Feature', 'Integration');
21
+
16
22
/*
17
23
|--------------------------------------------------------------------------
18
24
| Expectations
You can’t perform that action at this time.
0 commit comments