test(form-builder): WS-6 v1.3-delta D1 tests

32 new tests covering D1 deliverables:

- Migration shape (3): failure_response_code column presence,
  type/length/nullability, index name. MySQL information_schema
  introspection.
- Exception hierarchy (11): abstract base, RuntimeException ancestor,
  per-subclass constructor + reasonCode (named-args asserting
  submissionId is preserved structurally), Timeout extends Infra and
  inherits temporary_error, all subclasses extend base, previous-throwable
  chaining works, IdentityMatchInvariantViolation is NOT in the
  binding-applicator hierarchy and IS a DomainException.
- FormBindingExceptionClassifier matrix (6): each subclass maps to its
  reason code; Timeout dispatches to inherited 'temporary_error';
  arbitrary RuntimeException -> 'unknown_error'; IdentityMatchInvariantViolation
  -> 'unknown_error' (intentional fallback per docstring).
- FormFieldBindingMergeStrategy::validForTargetType (4 tests covering
  the full 4 strategies x 3 target types matrix).
- FormSubmissionIdentityMatchResolved (4): ShouldBroadcast contract,
  private channel naming ('private-submission.{id}'), broadcast-as
  string, payload assignment.
- FormSubmission failure_response_code cast (4): persists as plain
  string, NULL by default, factory state composes with apply_status,
  round-trips for all four canonical codes.

Baseline regenerated to absorb new tautological-assertion entries (48
lines) — these are class-hierarchy regression guards that Larastan
correctly flags as statically known. The pattern is established in the
codebase per existing baseline entries for similar tests.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-08 02:09:48 +02:00
parent 01c5ff207a
commit c29ad75ecc
7 changed files with 484 additions and 0 deletions

View File

@@ -7404,6 +7404,54 @@ parameters:
count: 1
path: tests/Unit/ExampleTest.php
-
message: '#^Call to function is_subclass_of\(\) with ''App\\\\Exceptions\\\\FormBuilder\\\\FormBindingApplicatorException'' and ''RuntimeException'' will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
count: 1
path: tests/Unit/Exceptions/FormBuilder/FormBindingApplicatorExceptionHierarchyTest.php
-
message: '#^Call to function is_subclass_of\(\) with ''App\\\\Exceptions\\\\FormBuilder\\\\FormBindingApplicatorTimeoutException'' and ''App\\\\Exceptions\\\\FormBuilder\\\\FormBindingInfraException'' will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
count: 1
path: tests/Unit/Exceptions/FormBuilder/FormBindingApplicatorExceptionHierarchyTest.php
-
message: '#^Call to function is_subclass_of\(\) with ''App\\\\Exceptions\\\\FormBuilder\\\\FormBindingApplicatorTimeoutException''\|''App\\\\Exceptions\\\\FormBuilder\\\\FormBindingDataIntegrityException''\|''App\\\\Exceptions\\\\FormBuilder\\\\FormBindingInfraException''\|''App\\\\Exceptions\\\\FormBuilder\\\\FormBindingSchemaConfigException'' and ''App\\\\Exceptions\\\\FormBuilder\\\\FormBindingApplicatorException'' will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
count: 1
path: tests/Unit/Exceptions/FormBuilder/FormBindingApplicatorExceptionHierarchyTest.php
-
message: '#^Call to function is_subclass_of\(\) with ''App\\\\Exceptions\\\\FormBuilder\\\\IdentityMatchInvariantViolation'' and ''App\\\\Exceptions\\\\FormBuilder\\\\FormBindingApplicatorException'' will always evaluate to false\.$#'
identifier: function.impossibleType
count: 1
path: tests/Unit/Exceptions/FormBuilder/FormBindingApplicatorExceptionHierarchyTest.php
-
message: '#^Call to function is_subclass_of\(\) with ''App\\\\Exceptions\\\\FormBuilder\\\\IdentityMatchInvariantViolation'' and ''DomainException'' will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
count: 1
path: tests/Unit/Exceptions/FormBuilder/FormBindingApplicatorExceptionHierarchyTest.php
-
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertFalse\(\) with false will always evaluate to true\.$#'
identifier: method.alreadyNarrowedType
count: 1
path: tests/Unit/Exceptions/FormBuilder/FormBindingApplicatorExceptionHierarchyTest.php
-
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertTrue\(\) with true and ''Class App…'' will always evaluate to true\.$#'
identifier: method.alreadyNarrowedType
count: 1
path: tests/Unit/Exceptions/FormBuilder/FormBindingApplicatorExceptionHierarchyTest.php
-
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertTrue\(\) with true will always evaluate to true\.$#'
identifier: method.alreadyNarrowedType
count: 3
path: tests/Unit/Exceptions/FormBuilder/FormBindingApplicatorExceptionHierarchyTest.php
-
message: '#^Access to an undefined property Illuminate\\Database\\Eloquent\\Model\:\:\$id\.$#'
identifier: property.notFound