Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laratesto Laravel Package

ichinya/laratesto

Laratesto is a Laravel package that provides convenient testing utilities and expressive helpers for PHP applications, reducing boilerplate so you can write clear, reliable feature and unit tests with less effort.

View on GitHub
Deep Wiki
Context7

Getting Started

  • Install as a dev dependency: composer require --dev ichinya/laratesto. The package requires PHP >=8.3 and integrates with Laravel’s testing stack; check the README for the exact Laravel version constraints (a fresh Laravel 13 skeleton was used in the release validation).
  • Start with the updated README and the bundled Agent Skills. They contain the English and Russian Testo examples that now correctly demonstrate class-level #[Test] usage with Laravel test cases.
  • First use case: create a test class that extends LaravelTestCase or uses the InteractsWithLaravel trait, and annotate it with #[Test] at the class level. All public test methods will be discovered and run by the native Testo CLI (no PHPUnit required). This is the exact scenario fixed in 0.8.3.
  • Run tests using the package’s native CLI (see README for the command). The release adds a CLI regression to ensure class-level attribute discovery works end-to-end.

Implementation Patterns

  • Prefer class-level #[Test] on Laravel test classes to avoid annotating every method. After 0.8.3 this works correctly with LaravelTestCase and InteractsWithLaravel, including inherited user tests and user overrides.
  • Use method-level #[Test] when you need selective control or when a class contains helper methods that should not be treated as tests.
  • Build a base test class with shared setup and helpers, then extend it in concrete test classes with class-level #[Test]. The fix preserves inherited user tests, so base-class test methods are discovered in child classes as expected.
  • Bridge helper implementations, including trait aliases, are automatically excluded from discovery. This means you can safely use Laravel testing traits and trait aliases without accidentally running framework internals as tests.
  • User overrides are preserved: if you override a method that matches a bridge helper name, your implementation is still discovered according to your attributes. Use this to customize behavior without losing test discovery.
  • Workflow: keep tests under tests/, use Laravel’s testing helpers (HTTP tests, database assertions, etc.) inside Testo test methods, and run the native CLI in local development and CI. The release validation confirms the published package works in a clean Laravel skeleton without path repositories or platform overrides.

Gotchas and Tips

  • Upgrade to 0.8.3 if you use class-level #[Test] with LaravelTestCase or InteractsWithLaravel. Earlier versions may silently skip or misdiscover those tests; the regression and CLI test added here are specifically for that case.
  • Class-level #[Test] now excludes bridge helper implementations (including trait aliases). If a method disappears from discovery, check whether its name matches a bridge helper; use an explicit method-level #[Test] or rename the method if you need it to run.
  • Inherited user tests are preserved. If you have abstract base classes, remember that their test methods will run in concrete subclasses. Keep shared test logic in abstract classes or traits only when you want it inherited.
  • The package requires PHP >=8.3. The release validation covers PHP 8.3, 8.4 and 8.5. PHP 8.6 is currently blocked by the locked nette/schema dependency; do not expect PHP 8.6 support until that constraint is lifted.
  • Debugging discovery: run the native CLI and inspect its output for skipped or helper cases. The release verification explicitly checks for “zero skips or helper cases” in the documentation examples, so unexpected skips often indicate a discovery issue.
  • Read the bundled Agent Skills and README for configuration and extension points (test paths, bootstrap, discovery rules). The release updates both, and they reflect the correct class-level attribute behavior.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin