Skip to content

Normalize test fixtures - #61315

Merged
taylorotwell merged 6 commits into
laravel:13.xfrom
jasonmccreary:fixtures
Aug 24, 2026
Merged

taylorotwell merged 6 commits into
laravel:13.xfrom
jasonmccreary:fixtures

Conversation

@jasonmccreary

Copy link
Copy Markdown
Contributor

This normalizes the test "fixtures" to be consistently co-located under a Fixtures/ folder. This folder contains both properly namespaced classes, as well as "stub" files (migrations, templates, etc) used by the test suite.

"Fixtures" was chosen as it was already the most used convention within the test suite, is a common testing term, honors PSR-4, and avoids potential confusion with the "stub" files that can be published.

@taylorotwell
taylorotwell merged commit 32da44b into laravel:13.x Aug 24, 2026
53 checks passed
binaryfire added a commit to hypervel/components that referenced this pull request Sep 12, 2026
Request ApproximateReceiveCount through MessageSystemAttributeNames when
receiving an SQS job. The AWS SDK 3.395.0 input shapes reject the deprecated
AttributeNames form, exposing the source-analysis failure in CI. The response
still supplies the same Attributes map used by SqsJob::attempts().

Update the existing exact request expectations and keep the queue counts on
their separate getQueueAttributes API. Align the queue package suggestion and
public prerequisite with the existing SDK minimum, 3.322.9, whose service model
supports the replacement parameter. No compatibility branch, suppression or
public queue API change is needed.

Discovered during review of the fixture normalization port:
laravel/framework#61315
https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_ReceiveMessage.html

Validation: the CI error was reproduced with SDK 3.395.0. The SQS queue, job
and pool-proxy tests pass with the corrected request. Repository formatting
and full source/type-fixture analysis pass.
binaryfire added a commit to hypervel/components that referenced this pull request Sep 12, 2026
Match the duration span separately from the task description and result.
The previous matcher required milliseconds, so a migration taking more than
a second could fail the test despite completing successfully. Hypervel also
formats longer runtimes with minutes, hours and localized units.

Preserve the existing exact task and result expectations. Verify the fix with
the existing migration suite and a temporary clock override that reproduces
the old mismatch without sleeping or adding permanent test infrastructure.

Corrects the test port from:
laravel/framework#61315

Validation: the normal and simulated-slow migration suite, related migration
and console tests, formatting and full static analysis pass.
binaryfire added a commit to hypervel/components that referenced this pull request Sep 12, 2026
Delete the unused flights migration moved during fixture normalization. No
test loads this directory, and it is unreferenced in the upstream tests too.
The active Migrator suite already checks the skipped age migration and its
schema result; MigratorEventsTest separately checks the skipped event.

Retain that existing coverage instead of adding a duplicate test solely to
justify an unused fixture.

laravel/framework#55011
laravel/framework#61315

Validation: migrator, migration integration, event and console component tests
pass, along with repository formatting and full static analysis.
binaryfire added a commit to hypervel/components that referenced this pull request Sep 12, 2026
Remove the duplicate route-level InvokeDeferredCallbacks registration and its
unused import. The middleware is already global, and the HTTP kernel invokes
both route and global terminable middleware. The test now follows the same
request setup as its neighboring HTTP cases.

Keep the synchronous job and deferred-callback assertion, which still verifies
that running the job cannot discard the request's callback.

Refines the upstream test port completed with:
laravel/framework#61315
laravel/framework#61422

Validation: the complete deferred-callback test class, repository formatting
and full static analysis pass.
binaryfire added a commit to hypervel/components that referenced this pull request Sep 12, 2026
Use PascalCase names for the pure, string-backed and integer-backed HTTP test
enums, matching the repository convention. Update their consumers together
while preserving every backed value and request data key.

These fixtures test backed-value conversion and pure-enum rejection; no
external value is derived from the case names. Existing assertions cover the
same behavior without adding more tests.

Completes the convention cleanup in:
laravel/framework#61315
laravel/framework#61422

Validation: the complete HttpRequestTest, stale-reference search, repository
formatting and full static analysis pass.
binaryfire added a commit to hypervel/components-backup that referenced this pull request Oct 1, 2026
The autoscaler rounded worker allocations with ceil(), which returns a float,
then passed that value to ProcessPool::scale(int). Strict fixture typing
exposed the same TypeError that the real pool can encounter during scaling.
Convert the rounded count to int before applying the existing scaling limits.

Move FakePool into Fixtures and give it the real pool's native signatures so
existing autoscaler tests exercise this boundary. Remove redundant casts and
the duplicate promoted-property assignment from ProcessPool; retain the
existing scaling algorithm and public API.

Discovered while completing Laravel fixture normalization:
laravel/framework#61315

Validated the existing autoscaler and supervisor tests, both scaling-direction
probes, full source/type analysis, formatting, and the full parallel suite.
binaryfire added a commit to hypervel/components-backup that referenced this pull request Oct 1, 2026
Merge the second factory suite into DatabaseEloquentFactoryTest and remove its
unused migration. Preserve the canonical schema, callback assertions, and
fresh-database relationship checks while retaining unique scalar-key attach,
attribute precedence, count, resolver isolation, and state-reset coverage.

The resolver tests now observe two class-specific resolvers at the same time;
the reset test checks resolver behavior before and after flushing state. Reuse
the existing fixture hierarchy and add only the two precedence helpers needed
to distinguish conflicting factory declarations.

Reconciled during complete fixture normalization and deduplication:
laravel/framework#61315
laravel/framework#61422

Validated the merged factory suite immediately, then formatting, full static
analysis, the full parallel suite, Testbench package mode and the dogfood
package. No production factory behavior changes.
binaryfire added a commit to hypervel/components-backup that referenced this pull request Oct 1, 2026
Add the complete missing MigratorTest and its named and anonymous migration
fixtures from Laravel's current pinned source. Cover migration execution,
execution without console output, skipped migrations and re-enabling them,
rollback, pretend SQL, and queries that deliberately run outside pretend mode.

Use a self-contained SQLite connection because the assertions exercise SQLite
SQL and schema inspection. Adapt the output mock to Hypervel's OutputStyle
contract and rely on existing framework cleanup for static migration state.
Keep all fixtures under Database/Fixtures/Migrator without changing migration
source behavior or adding test infrastructure.

Completes the missing migration surface encountered in:
laravel/framework#61315

Source: laravel/framework 01d008c9b5f32cb7c5e50a9a22273113d810b2a2.
Validated the complete new test class, formatting, full analysis, the full
parallel suite, Testbench package mode and the dogfood package.
binaryfire added a commit to hypervel/components-backup that referenced this pull request Oct 1, 2026
Document the approved fixture convention beside the Fixtures directory rule:
reusable classes and enums use separate PSR-4 files; single-test helpers stay
inline and are never shared between test files. Keep Integration-only fixtures
under Integration, sharing across test trees only when it makes tests clearer.

Retain combined files when their structure is itself under test. This preserves
parser and version-gated fixtures without turning ordinary reusable enums into
manual-load bundles. Matches the owner-approved main-checkout guide update.

Applied while reviewing Laravel fixture normalization:
laravel/framework#61315
laravel/framework#61422
binaryfire added a commit to hypervel/components-backup that referenced this pull request Oct 1, 2026
Complete Laravel's fixture normalization and overlapping deduplication across
all applicable files, including Hypervel-only packages. Move standalone models,
commands, migrations, templates, environment files and server scripts into
Fixtures, updating namespaces, path expectations, autoload depths and tooling
consumers together. Move the Go interoperability module and its CI references
without changing the protocol fixtures.

Split independently reusable enum and helper bundles into PSR-4 files and
remove their manual includes and the obsolete Validation classmap. Keep
Integration-only models under Integration, retain distinct model behavior,
and leave single-test helpers inline. Preserve parser/version-gated bundles,
script-local helpers and model-owned factories where their grouping has a
purpose. Remove unused fixture classes instead of relocating dead code.

Restore the missing Mail facade tests and the HTTP/deferred-callback/sync-job
case from the pinned upstream tests. Preserve immutable timestamp casts and
existing direct attribute assignment. Use semantic UUID/ULID columns in the
concern fixture; SQLite produces the same column type for these declarations.
No production API, compatibility loader or fixture-layout tests are added.

laravel/framework#61315
laravel/framework#61422
Source: laravel/framework 01d008c9b5f32cb7c5e50a9a22273113d810b2a2.
Both PRs are fully reconciled with the accompanying migrator and factory-test
commits; generated legacy route caches and unsupported DocsCommand fixtures
retain their established exclusions.

Validation: each changed test class passed during implementation; full
composer fix passed formatting, source/type analysis, parallel tests, Testbench
package mode and dogfood. Relocated Engine, HTTP, gRPC PHP/Go, Reverb, Horizon,
Meilisearch and Typesense fixtures passed with isolated services. Timestamp
fixtures passed on MySQL and MariaDB. Algolia and PostgreSQL-only Scout checks
were skipped without their service/account configuration. PSR-4 and stale-path
checks passed; the final UUID/ULID correction passed both concern suites.
binaryfire added a commit to hypervel/components-backup that referenced this pull request Oct 1, 2026
Compare in_array and doesnt_contain values strictly and document their type-sensitive behavior. Retain contains behavior from the current upstream target.

Port the remaining scalar in-rule cases, remove its obsolete documented difference, and consolidate contains/doesnt_contain tests under upstream file names. Preserve distinct existing assertions while restoring missing rule-formatting cases and adding strict-membership coverage. The validation suite and analysis pass.

Upstream:
laravel/framework#61146
laravel/framework#61315
laravel/framework#61319
laravel/framework#61318

Source: laravel/framework master 7068848dfe48fc3a433598e09ce798799d442a52.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants