File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,14 +11,18 @@ jobs:
1111 strategy :
1212 matrix :
1313 php : [8.4, 8.3, 8.2, 8.1]
14- laravel : ['10.*', '11.*', '12.*']
14+ laravel : ['10.*', '11.*', '12.*', '13.*' ]
1515 exclude :
1616 - php : 8.1
1717 laravel : 11.*
1818 - php : 8.4
1919 laravel : 10.*
2020 - laravel : 12.*
2121 php : 8.1
22+ - laravel : 13.*
23+ php : 8.2
24+ - laravel : 13.*
25+ php : 8.1
2226
2327 name : P${{ matrix.php }} - L${{ matrix.laravel }}
2428
Original file line number Diff line number Diff line change 1818 "homepage" : " https://github.com/olssonm/l5-very-basic-auth" ,
1919 "require" : {
2020 "php" : " ^8.0 || ^8.1 || ^8.2" ,
21- "illuminate/support" : " ^9.0 || ^10.0 || ^11.0 || ^12.0"
21+ "illuminate/support" : " ^9.0 || ^10.0 || ^11.0 || ^12.0 || ^13.0 "
2222 },
2323 "require-dev" : {
2424 "laravel/helpers" : " ^1.1" ,
25- "orchestra/testbench" : " ^7.0 || ^8.0 || ^9.0 || ^10.0" ,
26- "pestphp/pest" : " ^1.0 || ^2.0 || ^3.7" ,
27- "pestphp/pest-plugin-laravel" : " ^1.2 || ^2.0 || ^3.1" ,
25+ "orchestra/testbench" : " ^7.0 || ^8.0 || ^9.0 || ^10.0 || ^11.0 " ,
26+ "pestphp/pest" : " ^1.0 || ^2.0 || ^3.7 || ^4.4 " ,
27+ "pestphp/pest-plugin-laravel" : " ^1.2 || ^2.0 || ^3.1 || ^4.1 " ,
2828 "phpstan/phpstan" : " ^2.0" ,
29- "phpunit/phpunit" : " ^9.0 || ^10.5 || ^11.5.3" ,
30- "squizlabs/php_codesniffer" : " ^3.5"
29+ "phpunit/phpunit" : " ^9.0 || ^10.5 || ^11.5.3 || ^12.5.12 " ,
30+ "squizlabs/php_codesniffer" : " ^3.5 || ^4.0 "
3131 },
3232 "minimum-stability" : " dev" ,
3333 "prefer-stable" : true ,
Original file line number Diff line number Diff line change 11<?php
22
3+ use Illuminate \Support \Str ;
34use Olssonm \VeryBasicAuth \Handlers \DefaultResponseHandler ;
45use Olssonm \VeryBasicAuth \Handlers \ResponseHandler ;
56use Olssonm \VeryBasicAuth \Http \Middleware \VeryBasicAuth ;
5051 ])->get ('/ ' );
5152
5253 expect ($ response ->getStatusCode ())->toEqual (401 );
53- expect ($ response-> headers -> get ( ' content-type ' ))->toEqual ('text/html; charset=UTF -8 ' );
54+ expect (requestHeader ( $ response ))->toEqual ('text/html; charset=utf -8 ' );
5455 expect ($ response ->headers ->get ('WWW-Authenticate ' ))->toEqual (sprintf ('Basic realm="%s", charset="UTF-8" ' , config ('very_basic_auth.realm ' )));
5556 expect ($ response ->getContent ())->toEqual (config ('very_basic_auth.error_message ' ));
5657});
9394 ])->get ('/ ' );
9495
9596 expect ($ response ->getStatusCode ())->toEqual (401 );
96- expect ($ response-> headers -> get ( ' content-type ' ))->toEqual ('text/html; charset=UTF -8 ' );
97+ expect (requestHeader ( $ response ))->toEqual ('text/html; charset=utf -8 ' );
9798 expect ($ response ->headers ->get ('WWW-Authenticate ' ))->toEqual (sprintf ('Basic realm="%s", charset="UTF-8" ' , config ('very_basic_auth.realm ' )));
9899
99100 $ this ->assertStringContainsStringIgnoringCase ('This is the default view for the olssonm/l5-very-basic-auth-package ' , $ response ->getContent ());
208209 expect (app ()->make ('hash ' )->check ($ password , $ hashedPassword ))->toBeTrue ();
209210 expect (config ('app.name ' ))->toEqual ('Laravel ' );
210211});
212+
213+ function requestHeader ($ response ): string
214+ {
215+ return Str::lower ($ response ->headers ->get ('content-type ' ));
216+ }
You can’t perform that action at this time.
0 commit comments