Skip to content

Commit

Permalink
Fixed a typo.
Browse files Browse the repository at this point in the history
  • Loading branch information
ulin-evgeny committed May 2, 2024
1 parent ff32d9b commit 1a362fd
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion tests/AutoDocMiddlewareTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class AutoDocMiddlewareTest extends TestCase

public function testHandle()
{
$this->mockDriverGetEmptyAndSaveTpmData($this->getJsonFixture('tmp_data_search_roles_request'));
$this->mockDriverGetEmptyAndSaveTmpData($this->getJsonFixture('tmp_data_search_roles_request'));

$request = $this->generateGetRolesRequest();

Expand Down
36 changes: 18 additions & 18 deletions tests/SwaggerServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@ public function testConstructorDriverClassNotImplementsInterface()

public function testResponseHeaderWithItems()
{
$this->mockDriverGetTpmData($this->getJsonFixture('documentation/array_response_header_with_items'));
$this->mockDriverGetTmpData($this->getJsonFixture('documentation/array_response_header_with_items'));

app(SwaggerService::class);
}

public function testFormData()
{
$this->mockDriverGetTpmData($this->getJsonFixture('documentation/formdata_request'));
$this->mockDriverGetTmpData($this->getJsonFixture('documentation/formdata_request'));

app(SwaggerService::class);
}
Expand Down Expand Up @@ -357,7 +357,7 @@ public function testAddDataRequestWithEmptyDataLaravel(string $security, string
]
]);

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

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

$this->mockDriverGetEmptyAndSaveTpmData(
$this->mockDriverGetEmptyAndSaveTmpData(
[],
$this->getJsonFixture('tmp_data_request_with_empty_data_and_info')
);
Expand Down Expand Up @@ -408,7 +408,7 @@ public static function getAddData(): array
#[DataProvider('getAddData')]
public function testAddData(?string $contentType, string $requestFixture, string $responseFixture)
{
$this->mockDriverGetEmptyAndSaveTpmData($this->getJsonFixture($requestFixture));
$this->mockDriverGetEmptyAndSaveTmpData($this->getJsonFixture($requestFixture));

$service = app(SwaggerService::class);

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

public function testAddDataRequestWithoutRuleType()
{
$this->mockDriverGetEmptyAndSaveTpmData(
$this->mockDriverGetEmptyAndSaveTmpData(
$this->getJsonFixture('tmp_data_search_roles_request_without_rule_type')
);

Expand All @@ -439,7 +439,7 @@ public function testAddDataRequestWithoutRuleType()

public function testAddDataRequestWithAnnotations()
{
$this->mockDriverGetEmptyAndSaveTpmData(
$this->mockDriverGetEmptyAndSaveTmpData(
$this->getJsonFixture('tmp_data_search_roles_request_with_annotations')
);

Expand Down Expand Up @@ -494,7 +494,7 @@ public function testAddDataWithSecurity(string $security, string $requestFixture
]
]);

$this->mockDriverGetEmptyAndSaveTpmData($this->getJsonFixture($requestFixture));
$this->mockDriverGetEmptyAndSaveTmpData($this->getJsonFixture($requestFixture));

$service = app(SwaggerService::class);

Expand All @@ -516,7 +516,7 @@ public function testAddDataWithInvalidSecurity()

public function testAddDataWithPathParameters()
{
$this->mockDriverGetEmptyAndSaveTpmData($this->getJsonFixture('tmp_data_get_user_request'));
$this->mockDriverGetEmptyAndSaveTmpData($this->getJsonFixture('tmp_data_get_user_request'));

$service = app(SwaggerService::class);

Expand All @@ -537,7 +537,7 @@ public function testAddDataWithPathParameters()

public function testAddDataWithTypeNameInResponse()
{
$this->mockDriverGetTpmData($this->getJsonFixture('tmp_data_get_user_request'));
$this->mockDriverGetTmpData($this->getJsonFixture('tmp_data_get_user_request'));

$service = app(SwaggerService::class);

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

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

$service = app(SwaggerService::class);

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

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

$service = app(SwaggerService::class);

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

$this->mockDriverGetPreparedAndSaveTpmData(
$this->mockDriverGetPreparedAndSaveTmpData(
$this->getJsonFixture('tmp_data_put_user_request'),
$this->getJsonFixture('tmp_data_put_user_request_with_early_generated_doc')
);
Expand All @@ -622,7 +622,7 @@ public function testAddDataPostRequestWithObjectParams()
{
config(['auto-doc.security' => 'jwt']);

$this->mockDriverGetEmptyAndSaveTpmData(
$this->mockDriverGetEmptyAndSaveTmpData(
$this->getJsonFixture('tmp_data_post_user_request_with_object_params')
);

Expand All @@ -649,7 +649,7 @@ public function testAddDataPostRequestWithObjectParams()

public function testCutExceptions()
{
$this->mockDriverGetEmptyAndSaveTpmData($this->getJsonFixture('tmp_data_create_user_request'));
$this->mockDriverGetEmptyAndSaveTmpData($this->getJsonFixture('tmp_data_create_user_request'));

$service = app(SwaggerService::class);

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

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

$service = app(SwaggerService::class);

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

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

$service = app(SwaggerService::class);

Expand Down Expand Up @@ -734,7 +734,7 @@ public function testSaveProductionData()

public function testAddDataDescriptionForRouteConditionals()
{
$this->mockDriverGetEmptyAndSaveTpmData(
$this->mockDriverGetEmptyAndSaveTmpData(
$this->getJsonFixture('tmp_data_get_route_parameters_description')
);

Expand Down
6 changes: 3 additions & 3 deletions tests/support/Traits/SwaggerServiceMockTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ trait SwaggerServiceMockTrait
{
use MockTrait;

protected function mockDriverGetEmptyAndSaveTpmData(
protected function mockDriverGetEmptyAndSaveTmpData(
$tmpData,
$savedTmpData = null,
$driverClass = LocalDriver::class
Expand All @@ -32,7 +32,7 @@ protected function mockDriverGetEmptyAndSaveTpmData(
$this->app->instance($driverClass, $driver);
}

protected function mockDriverGetPreparedAndSaveTpmData(
protected function mockDriverGetPreparedAndSaveTmpData(
$getTmpData,
$saveTmpData,
$driverClass = LocalDriver::class
Expand All @@ -52,7 +52,7 @@ protected function mockDriverGetPreparedAndSaveTpmData(
$this->app->instance($driverClass, $driver);
}

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

Expand Down

0 comments on commit 1a362fd

Please sign in to comment.