Skip to content

Commit 6e9e369

Browse files
committed
Reformat tests to PSR-12
1 parent 178ae03 commit 6e9e369

File tree

4 files changed

+46
-47
lines changed

4 files changed

+46
-47
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
},
3232
"scripts": {
3333
"test": "phpunit",
34-
"check-style": "phpcs -p --standard=PSR12 --exclude=Generic.Files.LineLength --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 src",
35-
"fix-style": "phpcbf -p --standard=PSR12 --exclude=Generic.Files.LineLength --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 src"
34+
"check-style": "phpcs -p --standard=PSR12 --exclude=Generic.Files.LineLength --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 src tests",
35+
"fix-style": "phpcbf -p --standard=PSR12 --exclude=Generic.Files.LineLength --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 src tests"
3636
},
3737
"extra": {
3838
"branch-alias": {

tests/CorsServiceTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class CorsServiceTest extends TestCase
2121
/**
2222
* @test
2323
*/
24-
public function it_can_have_options()
24+
public function itCanHaveOptions()
2525
{
2626
$service = new CorsService([
2727
'allowedOrigins' => ['*']
@@ -33,7 +33,7 @@ public function it_can_have_options()
3333
/**
3434
* @test
3535
*/
36-
public function it_can_have_no_options()
36+
public function itCanHaveNoOptions()
3737
{
3838
$service = new CorsService();
3939
$this->assertInstanceOf(CorsService::class, $service);
@@ -42,7 +42,7 @@ public function it_can_have_no_options()
4242
/**
4343
* @test
4444
*/
45-
public function it_can_have_empty_options()
45+
public function itCanHaveEmptyOptions()
4646
{
4747
$service = new CorsService([]);
4848
$this->assertInstanceOf(CorsService::class, $service);
@@ -51,7 +51,7 @@ public function it_can_have_empty_options()
5151
/**
5252
* @test
5353
*/
54-
public function it_throws_exception_on_invalid_exposed_headers()
54+
public function itThrowsExceptionOnInvalidExposedHeaders()
5555
{
5656
$this->expectException(InvalidOptionException::class);
5757

@@ -61,7 +61,7 @@ public function it_throws_exception_on_invalid_exposed_headers()
6161
/**
6262
* @test
6363
*/
64-
public function it_throws_exception_on_invalid_origins_array()
64+
public function itThrowsExceptionOnInvalidOriginsArray()
6565
{
6666
$this->expectException(InvalidOptionException::class);
6767

@@ -71,7 +71,7 @@ public function it_throws_exception_on_invalid_origins_array()
7171
/**
7272
* @test
7373
*/
74-
public function it_normalizes_wildcard_options()
74+
public function itNormalizesWildcardOrigins()
7575
{
7676
$origins = ['*'];
7777

@@ -84,7 +84,7 @@ public function it_normalizes_wildcard_options()
8484
/**
8585
* @test
8686
*/
87-
public function it_converts_origin_patterns()
87+
public function itConvertsWildcardOriginPatterns()
8888
{
8989
$service = new CorsService(['allowedOrigins' => ['*.mydomain.com']]);
9090
$this->assertInstanceOf(CorsService::class, $service);
@@ -96,7 +96,7 @@ public function it_converts_origin_patterns()
9696
/**
9797
* @test
9898
*/
99-
public function it_normalizes_underscore_options()
99+
public function itNormalizesUnderscoreOptions()
100100
{
101101
$origins = ['localhost'];
102102

0 commit comments

Comments
 (0)