Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ protected function setUp(): void
}

#[Test]
public function di_04_cat_with_only_cat_fields_passes_via_validate_schema(): void
public function cat_with_only_cat_fields_passes_via_validate_schema(): void
{
$validator = $this->buildPetValidator();

Expand All @@ -123,7 +123,7 @@ public function di_04_cat_with_only_cat_fields_passes_via_validate_schema(): voi
}

#[Test]
public function di_04_dog_with_only_dog_fields_passes_via_validate_schema(): void
public function dog_with_only_dog_fields_passes_via_validate_schema(): void
{
$validator = $this->buildPetValidator();

Expand All @@ -134,7 +134,7 @@ public function di_04_dog_with_only_dog_fields_passes_via_validate_schema(): voi
}

#[Test]
public function di_04_cat_with_dog_only_field_bark_rejected_by_additional_properties(): void
public function cat_with_dog_only_field_bark_rejected_by_additional_properties(): void
{
$validator = $this->buildPetValidator();

Expand All @@ -149,7 +149,7 @@ public function di_04_cat_with_dog_only_field_bark_rejected_by_additional_proper
}

#[Test]
public function di_04_dog_with_cat_only_field_meow_rejected_by_additional_properties(): void
public function dog_with_cat_only_field_meow_rejected_by_additional_properties(): void
{
$validator = $this->buildPetValidator();

Expand All @@ -164,7 +164,7 @@ public function di_04_dog_with_cat_only_field_meow_rejected_by_additional_proper
}

#[Test]
public function di_04_unknown_pet_type_throws_unknown_discriminator_value(): void
public function unknown_pet_type_throws_unknown_discriminator_value(): void
{
$validator = $this->buildPetValidator();

Expand All @@ -175,7 +175,7 @@ public function di_04_unknown_pet_type_throws_unknown_discriminator_value(): voi
}

#[Test]
public function di_07_response_with_cat_body_passes(): void
public function response_with_cat_body_passes(): void
{
[$validator, $operation] = $this->buildPetValidatorWithOperation();

Expand All @@ -185,7 +185,7 @@ public function di_07_response_with_cat_body_passes(): void
}

#[Test]
public function di_07_response_with_dog_body_passes(): void
public function response_with_dog_body_passes(): void
{
[$validator, $operation] = $this->buildPetValidatorWithOperation();

Expand All @@ -195,7 +195,7 @@ public function di_07_response_with_dog_body_passes(): void
}

#[Test]
public function di_07_response_with_cat_body_and_dog_field_bark_rejected(): void
public function response_with_cat_body_and_dog_field_bark_rejected(): void
{
[$validator, $operation] = $this->buildPetValidatorWithOperation();

Expand All @@ -209,7 +209,7 @@ public function di_07_response_with_cat_body_and_dog_field_bark_rejected(): void
}

#[Test]
public function di_07_response_with_dog_body_and_cat_field_meow_rejected(): void
public function response_with_dog_body_and_cat_field_meow_rejected(): void
{
[$validator, $operation] = $this->buildPetValidatorWithOperation();

Expand All @@ -223,7 +223,7 @@ public function di_07_response_with_dog_body_and_cat_field_meow_rejected(): void
}

#[Test]
public function di_07_response_with_unknown_pet_type_throws_unknown_discriminator_value(): void
public function response_with_unknown_pet_type_throws_unknown_discriminator_value(): void
{
[$validator, $operation] = $this->buildPetValidatorWithOperation();

Expand Down
10 changes: 5 additions & 5 deletions tests/Functional/Request/CookieCoercionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ protected function setUp(): void
}

#[Test]
public function tc_07_type_coercer_directly_converts_cookie_string_to_int(): void
public function type_coercer_directly_converts_cookie_string_to_int(): void
{
$coercer = new TypeCoercer();
$param = new Parameter(schema: new Schema(type: 'integer'));
Expand All @@ -57,7 +57,7 @@ public function tc_07_type_coercer_directly_converts_cookie_string_to_int(): voi
}

#[Test]
public function tc_07_cookie_without_coercion_fails_const_check_on_string_value(): void
public function cookie_without_coercion_fails_const_check_on_string_value(): void
{
$validator = OpenApiValidatorBuilder::create()
->fromYamlString(self::COOKIE_COERCION_SPEC)
Expand All @@ -83,7 +83,7 @@ public function tc_07_cookie_without_coercion_fails_const_check_on_string_value(
}

#[Test]
public function tc_07_cookie_string_coerced_to_integer_passes_const_constraint(): void
public function cookie_string_coerced_to_integer_passes_const_constraint(): void
{
$validator = OpenApiValidatorBuilder::create()
->fromYamlString(self::COOKIE_COERCION_SPEC)
Expand All @@ -99,7 +99,7 @@ public function tc_07_cookie_string_coerced_to_integer_passes_const_constraint()
}

#[Test]
public function tc_07_cookie_non_numeric_string_throws_type_mismatch(): void
public function cookie_non_numeric_string_throws_type_mismatch(): void
{
$validator = OpenApiValidatorBuilder::create()
->fromYamlString(self::COOKIE_COERCION_SPEC)
Expand All @@ -126,7 +126,7 @@ public function tc_07_cookie_non_numeric_string_throws_type_mismatch(): void
}

#[Test]
public function tc_07_type_coercer_strict_mode_rejects_non_numeric_cookie_with_type_mismatch(): void
public function type_coercer_strict_mode_rejects_non_numeric_cookie_with_type_mismatch(): void
{
$coercer = new TypeCoercer();
$param = new Parameter(schema: new Schema(type: 'integer'));
Expand Down
20 changes: 10 additions & 10 deletions tests/Functional/Request/CookieValidationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ protected function setUp(): void
}

#[Test]
public function ck_01_type_coercer_directly_converts_cookie_string_to_int_25(): void
public function type_coercer_directly_converts_cookie_string_to_int_25(): void
{
$coercer = new TypeCoercer();
$param = new Parameter(schema: new Schema(type: 'integer'));
Expand All @@ -37,7 +37,7 @@ public function ck_01_type_coercer_directly_converts_cookie_string_to_int_25():
}

#[Test]
public function ck_01_cookie_integer_value_coerced_passes_const_constraint(): void
public function cookie_integer_value_coerced_passes_const_constraint(): void
{
$yaml = <<<'YAML'
openapi: 3.2.0
Expand Down Expand Up @@ -72,7 +72,7 @@ public function ck_01_cookie_integer_value_coerced_passes_const_constraint(): vo
}

#[Test]
public function ck_01_cookie_integer_without_coercion_fails_const_check(): void
public function cookie_integer_without_coercion_fails_const_check(): void
{
$yaml = <<<'YAML'
openapi: 3.2.0
Expand Down Expand Up @@ -117,7 +117,7 @@ public function ck_01_cookie_integer_without_coercion_fails_const_check(): void
}

#[Test]
public function ck_01_cookie_non_numeric_string_throws_type_mismatch(): void
public function cookie_non_numeric_string_throws_type_mismatch(): void
{
$yaml = <<<'YAML'
openapi: 3.2.0
Expand Down Expand Up @@ -163,7 +163,7 @@ public function ck_01_cookie_non_numeric_string_throws_type_mismatch(): void
}

#[Test]
public function ck_01_type_coercer_strict_mode_rejects_non_numeric_string_with_type_mismatch(): void
public function type_coercer_strict_mode_rejects_non_numeric_string_with_type_mismatch(): void
{
$coercer = new TypeCoercer();
$param = new Parameter(schema: new Schema(type: 'integer'));
Expand All @@ -186,7 +186,7 @@ public function ck_01_type_coercer_strict_mode_rejects_non_numeric_string_with_t
}

#[Test]
public function ck_02_cookie_url_encoded_utf8_value_decoded_to_string(): void
public function cookie_url_encoded_utf8_value_decoded_to_string(): void
{
$yaml = <<<'YAML'
openapi: 3.2.0
Expand Down Expand Up @@ -220,7 +220,7 @@ public function ck_02_cookie_url_encoded_utf8_value_decoded_to_string(): void
}

#[Test]
public function ck_02_cookie_url_encoded_utf8_value_decoded_does_not_match_other_const(): void
public function cookie_url_encoded_utf8_value_decoded_does_not_match_other_const(): void
{
$yaml = <<<'YAML'
openapi: 3.2.0
Expand Down Expand Up @@ -265,15 +265,15 @@ public function ck_02_cookie_url_encoded_utf8_value_decoded_does_not_match_other
}

#[Test]
public function ck_02_raw_url_decode_of_cyrillic_cookie_value_yields_utf8(): void
public function raw_url_decode_of_cyrillic_cookie_value_yields_utf8(): void
{
$decoded = rawurldecode('%D0%98%D0%B2%D0%B0%D0%BD');

$this->assertSame('Иван', $decoded);
}

#[Test]
public function ck_03_cookie_style_form_explode_collects_repeated_keys_into_array(): void
public function cookie_style_form_explode_collects_repeated_keys_into_array(): void
{
$yaml = <<<'YAML'
openapi: 3.2.0
Expand Down Expand Up @@ -313,7 +313,7 @@ public function ck_03_cookie_style_form_explode_collects_repeated_keys_into_arra
}

#[Test]
public function ck_03_cookie_style_form_explode_single_value_fails_array_schema(): void
public function cookie_style_form_explode_single_value_fails_array_schema(): void
{
$yaml = <<<'YAML'
openapi: 3.2.0
Expand Down
8 changes: 4 additions & 4 deletions tests/Functional/Request/DuplicateKeysTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ final class DuplicateKeysTest extends TestCase
YAML;

#[Test]
public function rb_11_php_json_decode_last_value_wins_for_duplicate_keys(): void
public function php_json_decode_last_value_wins_for_duplicate_keys(): void
{
$decoded = json_decode('{"value": 1, "value": 2}', true, 512, JSON_THROW_ON_ERROR);

$this->assertSame(['value' => 2], $decoded);
}

#[Test]
public function rb_11_duplicate_keys_last_value_wins_passes_validation(): void
public function duplicate_keys_last_value_wins_passes_validation(): void
{
$validator = OpenApiValidatorBuilder::create()
->fromYamlString(self::DUPLICATE_KEYS_SPEC)
Expand All @@ -69,7 +69,7 @@ public function rb_11_duplicate_keys_last_value_wins_passes_validation(): void
}

#[Test]
public function rb_11_duplicate_keys_negative_when_last_value_violates_schema(): void
public function duplicate_keys_negative_when_last_value_violates_schema(): void
{
$validator = OpenApiValidatorBuilder::create()
->fromYamlString(self::DUPLICATE_KEYS_SPEC)
Expand Down Expand Up @@ -103,7 +103,7 @@ public function rb_11_duplicate_keys_negative_when_last_value_violates_schema():
}

#[Test]
public function rb_11_decoded_body_round_trips_to_single_key(): void
public function decoded_body_round_trips_to_single_key(): void
{
$decoded = json_decode('{"value": 1, "value": 2}', true, 512, JSON_THROW_ON_ERROR);

Expand Down
10 changes: 5 additions & 5 deletions tests/Functional/Request/HeaderArrayTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ protected function setUp(): void
}

#[Test]
public function hd_05_header_string_value_with_commas_parses_to_array(): void
public function header_string_value_with_commas_parses_to_array(): void
{
$yaml = <<<'YAML'
openapi: 3.2.0
Expand Down Expand Up @@ -79,7 +79,7 @@ enum: [a, b, c]
}

#[Test]
public function hd_05_header_psr7_array_value_parses_to_array(): void
public function header_psr7_array_value_parses_to_array(): void
{
$validator = OpenApiValidatorBuilder::create()
->fromYamlString(self::HEADER_ARRAY_SPEC)
Expand All @@ -96,7 +96,7 @@ public function hd_05_header_psr7_array_value_parses_to_array(): void
}

#[Test]
public function hd_05_missing_required_header_throws_missing_parameter(): void
public function missing_required_header_throws_missing_parameter(): void
{
$validator = OpenApiValidatorBuilder::create()
->fromYamlString(self::HEADER_ARRAY_SPEC)
Expand All @@ -119,7 +119,7 @@ public function hd_05_missing_required_header_throws_missing_parameter(): void
}

#[Test]
public function hd_05_header_value_exceeding_max_items_throws_max_items_error(): void
public function header_value_exceeding_max_items_throws_max_items_error(): void
{
$yaml = <<<'YAML'
openapi: 3.2.0
Expand Down Expand Up @@ -164,7 +164,7 @@ public function hd_05_header_value_exceeding_max_items_throws_max_items_error():
}

#[Test]
public function hd_05_psr7_array_header_trims_split_items(): void
public function psr7_array_header_trims_split_items(): void
{
$yaml = <<<'YAML'
openapi: 3.2.0
Expand Down
10 changes: 5 additions & 5 deletions tests/Functional/Request/HeaderCoercionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ protected function setUp(): void
}

#[Test]
public function tc_08_type_coercer_directly_converts_header_string_to_int(): void
public function type_coercer_directly_converts_header_string_to_int(): void
{
$coercer = new TypeCoercer();
$param = new Parameter(schema: new Schema(type: 'integer'));
Expand All @@ -57,7 +57,7 @@ public function tc_08_type_coercer_directly_converts_header_string_to_int(): voi
}

#[Test]
public function tc_08_header_without_coercion_fails_const_check_on_string_value(): void
public function header_without_coercion_fails_const_check_on_string_value(): void
{
$validator = OpenApiValidatorBuilder::create()
->fromYamlString(self::HEADER_COERCION_SPEC)
Expand All @@ -83,7 +83,7 @@ public function tc_08_header_without_coercion_fails_const_check_on_string_value(
}

#[Test]
public function tc_08_header_string_coerced_to_integer_passes_const_constraint(): void
public function header_string_coerced_to_integer_passes_const_constraint(): void
{
$validator = OpenApiValidatorBuilder::create()
->fromYamlString(self::HEADER_COERCION_SPEC)
Expand All @@ -99,7 +99,7 @@ public function tc_08_header_string_coerced_to_integer_passes_const_constraint()
}

#[Test]
public function tc_08_header_non_numeric_string_fails_coercion_with_type_mismatch(): void
public function header_non_numeric_string_fails_coercion_with_type_mismatch(): void
{
$validator = OpenApiValidatorBuilder::create()
->fromYamlString(self::HEADER_COERCION_SPEC)
Expand All @@ -126,7 +126,7 @@ public function tc_08_header_non_numeric_string_fails_coercion_with_type_mismatc
}

#[Test]
public function tc_08_header_overflow_numeric_string_fails_coercion_with_type_mismatch(): void
public function header_overflow_numeric_string_fails_coercion_with_type_mismatch(): void
{
$yaml = <<<'YAML'
openapi: 3.2.0
Expand Down
4 changes: 2 additions & 2 deletions tests/Functional/Request/PathParameterEdgeCasesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@ public function ambiguous_paths_chosen_template_value_passes_own_const(): void
}

#[Test]
public function rp_05_param_only_root_path_matches_single_segment_value(): void
public function param_only_root_path_matches_single_segment_value(): void
{
$yaml = <<<YAML
openapi: 3.2.0
Expand Down Expand Up @@ -840,7 +840,7 @@ public function rp_05_param_only_root_path_matches_single_segment_value(): void
}

#[Test]
public function rp_05_param_only_root_path_rejects_empty_value(): void
public function param_only_root_path_rejects_empty_value(): void
{
$yaml = <<<YAML
openapi: 3.2.0
Expand Down
Loading
Loading