Skip to content

Commit d42ab6c

Browse files
authored
Merge pull request #128 from RonasIT/fixed-a-typo
Fixed a typo.
2 parents ff32d9b + 1a362fd commit d42ab6c

File tree

3 files changed

+22
-22
lines changed

3 files changed

+22
-22
lines changed

tests/AutoDocMiddlewareTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class AutoDocMiddlewareTest extends TestCase
1111

1212
public function testHandle()
1313
{
14-
$this->mockDriverGetEmptyAndSaveTpmData($this->getJsonFixture('tmp_data_search_roles_request'));
14+
$this->mockDriverGetEmptyAndSaveTmpData($this->getJsonFixture('tmp_data_search_roles_request'));
1515

1616
$request = $this->generateGetRolesRequest();
1717

tests/SwaggerServiceTest.php

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,14 @@ public function testConstructorDriverClassNotImplementsInterface()
7171

7272
public function testResponseHeaderWithItems()
7373
{
74-
$this->mockDriverGetTpmData($this->getJsonFixture('documentation/array_response_header_with_items'));
74+
$this->mockDriverGetTmpData($this->getJsonFixture('documentation/array_response_header_with_items'));
7575

7676
app(SwaggerService::class);
7777
}
7878

7979
public function testFormData()
8080
{
81-
$this->mockDriverGetTpmData($this->getJsonFixture('documentation/formdata_request'));
81+
$this->mockDriverGetTmpData($this->getJsonFixture('documentation/formdata_request'));
8282

8383
app(SwaggerService::class);
8484
}
@@ -357,7 +357,7 @@ public function testAddDataRequestWithEmptyDataLaravel(string $security, string
357357
]
358358
]);
359359

360-
$this->mockDriverGetEmptyAndSaveTpmData([], $this->getJsonFixture($savedTmpDataFixture));
360+
$this->mockDriverGetEmptyAndSaveTmpData([], $this->getJsonFixture($savedTmpDataFixture));
361361

362362
app(SwaggerService::class);
363363
}
@@ -366,7 +366,7 @@ public function testAddDataRequestWithEmptyDataAndInfo()
366366
{
367367
config(['auto-doc.info' => []]);
368368

369-
$this->mockDriverGetEmptyAndSaveTpmData(
369+
$this->mockDriverGetEmptyAndSaveTmpData(
370370
[],
371371
$this->getJsonFixture('tmp_data_request_with_empty_data_and_info')
372372
);
@@ -408,7 +408,7 @@ public static function getAddData(): array
408408
#[DataProvider('getAddData')]
409409
public function testAddData(?string $contentType, string $requestFixture, string $responseFixture)
410410
{
411-
$this->mockDriverGetEmptyAndSaveTpmData($this->getJsonFixture($requestFixture));
411+
$this->mockDriverGetEmptyAndSaveTmpData($this->getJsonFixture($requestFixture));
412412

413413
$service = app(SwaggerService::class);
414414

@@ -424,7 +424,7 @@ public function testAddData(?string $contentType, string $requestFixture, string
424424

425425
public function testAddDataRequestWithoutRuleType()
426426
{
427-
$this->mockDriverGetEmptyAndSaveTpmData(
427+
$this->mockDriverGetEmptyAndSaveTmpData(
428428
$this->getJsonFixture('tmp_data_search_roles_request_without_rule_type')
429429
);
430430

@@ -439,7 +439,7 @@ public function testAddDataRequestWithoutRuleType()
439439

440440
public function testAddDataRequestWithAnnotations()
441441
{
442-
$this->mockDriverGetEmptyAndSaveTpmData(
442+
$this->mockDriverGetEmptyAndSaveTmpData(
443443
$this->getJsonFixture('tmp_data_search_roles_request_with_annotations')
444444
);
445445

@@ -494,7 +494,7 @@ public function testAddDataWithSecurity(string $security, string $requestFixture
494494
]
495495
]);
496496

497-
$this->mockDriverGetEmptyAndSaveTpmData($this->getJsonFixture($requestFixture));
497+
$this->mockDriverGetEmptyAndSaveTmpData($this->getJsonFixture($requestFixture));
498498

499499
$service = app(SwaggerService::class);
500500

@@ -516,7 +516,7 @@ public function testAddDataWithInvalidSecurity()
516516

517517
public function testAddDataWithPathParameters()
518518
{
519-
$this->mockDriverGetEmptyAndSaveTpmData($this->getJsonFixture('tmp_data_get_user_request'));
519+
$this->mockDriverGetEmptyAndSaveTmpData($this->getJsonFixture('tmp_data_get_user_request'));
520520

521521
$service = app(SwaggerService::class);
522522

@@ -537,7 +537,7 @@ public function testAddDataWithPathParameters()
537537

538538
public function testAddDataWithTypeNameInResponse()
539539
{
540-
$this->mockDriverGetTpmData($this->getJsonFixture('tmp_data_get_user_request'));
540+
$this->mockDriverGetTmpData($this->getJsonFixture('tmp_data_get_user_request'));
541541

542542
$service = app(SwaggerService::class);
543543

@@ -560,7 +560,7 @@ public function testAddDataClosureRequest()
560560
{
561561
config(['auto-doc.security' => 'jwt']);
562562

563-
$this->mockDriverGetEmptyAndSaveTpmData($this->getJsonFixture('tmp_data_search_roles_closure_request'));
563+
$this->mockDriverGetEmptyAndSaveTmpData($this->getJsonFixture('tmp_data_search_roles_closure_request'));
564564

565565
$service = app(SwaggerService::class);
566566

@@ -577,7 +577,7 @@ public function testAddDataPostRequest()
577577
{
578578
config(['auto-doc.security' => 'jwt']);
579579

580-
$this->mockDriverGetEmptyAndSaveTpmData($this->getJsonFixture('tmp_data_post_user_request'));
580+
$this->mockDriverGetEmptyAndSaveTmpData($this->getJsonFixture('tmp_data_post_user_request'));
581581

582582
$service = app(SwaggerService::class);
583583

@@ -597,7 +597,7 @@ public function testAddDataToEarlyGeneratedDoc()
597597
{
598598
config(['auto-doc.security' => 'jwt']);
599599

600-
$this->mockDriverGetPreparedAndSaveTpmData(
600+
$this->mockDriverGetPreparedAndSaveTmpData(
601601
$this->getJsonFixture('tmp_data_put_user_request'),
602602
$this->getJsonFixture('tmp_data_put_user_request_with_early_generated_doc')
603603
);
@@ -622,7 +622,7 @@ public function testAddDataPostRequestWithObjectParams()
622622
{
623623
config(['auto-doc.security' => 'jwt']);
624624

625-
$this->mockDriverGetEmptyAndSaveTpmData(
625+
$this->mockDriverGetEmptyAndSaveTmpData(
626626
$this->getJsonFixture('tmp_data_post_user_request_with_object_params')
627627
);
628628

@@ -649,7 +649,7 @@ public function testAddDataPostRequestWithObjectParams()
649649

650650
public function testCutExceptions()
651651
{
652-
$this->mockDriverGetEmptyAndSaveTpmData($this->getJsonFixture('tmp_data_create_user_request'));
652+
$this->mockDriverGetEmptyAndSaveTmpData($this->getJsonFixture('tmp_data_create_user_request'));
653653

654654
$service = app(SwaggerService::class);
655655

@@ -669,7 +669,7 @@ public function testLimitResponseData()
669669
{
670670
config(['auto-doc.response_example_limit_count' => 1]);
671671

672-
$this->mockDriverGetEmptyAndSaveTpmData($this->getJsonFixture('tmp_data_search_users_request'));
672+
$this->mockDriverGetEmptyAndSaveTmpData($this->getJsonFixture('tmp_data_search_users_request'));
673673

674674
$service = app(SwaggerService::class);
675675

@@ -686,7 +686,7 @@ public function testAddDataWithoutBoundContract()
686686
{
687687
config(['auto-doc.response_example_limit_count' => 1]);
688688

689-
$this->mockDriverGetEmptyAndSaveTpmData($this->getJsonFixture('tmp_data_search_users_empty_request'));
689+
$this->mockDriverGetEmptyAndSaveTmpData($this->getJsonFixture('tmp_data_search_users_empty_request'));
690690

691691
$service = app(SwaggerService::class);
692692

@@ -734,7 +734,7 @@ public function testSaveProductionData()
734734

735735
public function testAddDataDescriptionForRouteConditionals()
736736
{
737-
$this->mockDriverGetEmptyAndSaveTpmData(
737+
$this->mockDriverGetEmptyAndSaveTmpData(
738738
$this->getJsonFixture('tmp_data_get_route_parameters_description')
739739
);
740740

tests/support/Traits/SwaggerServiceMockTrait.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ trait SwaggerServiceMockTrait
88
{
99
use MockTrait;
1010

11-
protected function mockDriverGetEmptyAndSaveTpmData(
11+
protected function mockDriverGetEmptyAndSaveTmpData(
1212
$tmpData,
1313
$savedTmpData = null,
1414
$driverClass = LocalDriver::class
@@ -32,7 +32,7 @@ protected function mockDriverGetEmptyAndSaveTpmData(
3232
$this->app->instance($driverClass, $driver);
3333
}
3434

35-
protected function mockDriverGetPreparedAndSaveTpmData(
35+
protected function mockDriverGetPreparedAndSaveTmpData(
3636
$getTmpData,
3737
$saveTmpData,
3838
$driverClass = LocalDriver::class
@@ -52,7 +52,7 @@ protected function mockDriverGetPreparedAndSaveTpmData(
5252
$this->app->instance($driverClass, $driver);
5353
}
5454

55-
protected function mockDriverGetTpmData($tmpData, $driverClass = LocalDriver::class): void
55+
protected function mockDriverGetTmpData($tmpData, $driverClass = LocalDriver::class): void
5656
{
5757
$driver = $this->mockClass($driverClass, ['getTmpData']);
5858

0 commit comments

Comments
 (0)