Skip to content

Commit b54036e

Browse files
authored
Fix
1 parent 05ee865 commit b54036e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tests/VeryBasicAuthTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use Olssonm\VeryBasicAuth\Tests\Fixtures\CustomResponseHandler;
77

88
use function Pest\Laravel\get;
9-
use function Pest\Laravel\withHeader;
9+
use function Pest\Laravel\withHeaders;
1010

1111
test('basic auth filter is set', function () {
1212
expect(in_array(VeryBasicAuth::class, $this->app->router->getMiddleware()))->toBeTrue();
@@ -36,7 +36,7 @@
3636
});
3737

3838
test('request with incorrect credentials fails - text/html', function () {
39-
$response = withHeader([
39+
$response = withHeaders([
4040
'PHP_AUTH_USER' => str_random(20),
4141
'PHP_AUTH_PW' => str_random(20),
4242
])->get('/');
@@ -48,7 +48,7 @@
4848
});
4949

5050
test('request with incorrect credentials fails - json', function () {
51-
$response = withHeader([
51+
$response = withHeaders([
5252
'PHP_AUTH_USER' => str_random(20),
5353
'PHP_AUTH_PW' => str_random(20),
5454
'Accept' => 'application/json',
@@ -66,7 +66,7 @@
6666
test('request with incorrect credentials fails - view', function () {
6767
config()->set('very_basic_auth.error_view', 'very_basic_auth::default');
6868

69-
$response = withHeader([
69+
$response = withHeaders([
7070
'PHP_AUTH_USER' => str_random(20),
7171
'PHP_AUTH_PW' => str_random(20),
7272
])->get('/');
@@ -79,7 +79,7 @@
7979
});
8080

8181
test('request with correct credentials passes', function () {
82-
$response = withHeader([
82+
$response = withHeaders([
8383
'PHP_AUTH_USER' => config('very_basic_auth.user'),
8484
'PHP_AUTH_PW' => config('very_basic_auth.password'),
8585
])->get('/');
@@ -103,7 +103,7 @@
103103
});
104104

105105
test('request with incorrect inline credentials fails', function () {
106-
$response = withHeader([
106+
$response = withHeaders([
107107
'PHP_AUTH_USER' => str_random(20),
108108
'PHP_AUTH_PW' => str_random(20),
109109
])->get('/inline');
@@ -113,7 +113,7 @@
113113
});
114114

115115
test('request with correct inline credentials passes', function () {
116-
$response = withHeader([
116+
$response = withHeaders([
117117
'PHP_AUTH_USER' => config('very_basic_auth.user'),
118118
'PHP_AUTH_PW' => config('very_basic_auth.password'),
119119
])->get('/inline');

0 commit comments

Comments
 (0)