Download the PHP package dashworthy/pest-plugin-arch-coverage without Composer

On this page you can find all versions of the php package dashworthy/pest-plugin-arch-coverage. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package pest-plugin-arch-coverage

pest-plugin-arch-coverage

One architecture expectation for Pest: every class under a mapped source directory must have a test file at the mirrored position.

The motivating case is generated code. An agent told by a failing test that its action needs a test writes one; an agent told so by a document does not. So the failure names the paths that would satisfy it rather than restating the rule.

Installation

The expectation registers itself through Composer's autoload.files. There is nothing to publish and no service provider.

Usage

The verb takes a whole layer — every class beneath a source root — and requires each to have a test at the mirrored position. It does not single out a kind of class: an action, a model, and a data object under the root are all subject to it equally. There is no "Actions directory" to point at; you map the root, and every class below it is covered.

Point it at a namespace, and the map mirrors each matched class into a test root at the same relative path. A class at App\Domains\Platform\Billing\Actions\PublishPlanVersion requires a test at tests/Unit/Domains/Platform/Billing/Actions/PublishPlanVersionTest.php, and the failure names that exact path until it exists:

Sending one layer to a different suite

The map is an argument, not a config file, and the longest matching source root wins. That lets one layer inside the tree mirror somewhere else without restating its parent — here, controllers run through the framework, so they belong in the feature suite while everything else stays in the unit suite:

A controller matches both roots; the longer one wins, so its test is required under tests/Feature/Domains/... and not in the unit suite. A single global config listing roots could not express "this subtree, but not its parent".

Signature

Parameter Meaning
$map source directory => test directory, or => [several]. Any one candidate satisfies the class. Longest matching source root wins, so a subtree can point at a different test root without restating its parent.
$suffix Appended to the source basename to form the test basename.
$skip Structural kinds needing no test: 'abstract', 'interface', 'trait', 'enum'. null means all four. Pass a shorter list to demand tests for a kind; pass [] to demand them for all.
$exempt FQCNs whose descendants and implementors are exempt. Naming a class here does not exempt that class itself.

Directories rather than namespaces, because a Pest test file declares no class: class_exists() is false for every test in a Pest suite, so whether a test exists is a question about a file.

Failures

One violation is reported per run. Pest\Arch\Blueprint::targeted() throws inside its own loop, so a convention failing across forty classes reports the first and you rerun for the next. Recovering aggregation would mean replacing Blueprint, which is a cost this package deliberately does not pay.

Deliberately not included

Suppression

pest-plugin-arch honours @pest-arch-ignore-line and @pest-arch-ignore-next-line unconditionally, and that cannot be disabled from outside Blueprint. If suppression matters to you, police it with an ordinary arch test:

Licence

MIT.


All versions of pest-plugin-arch-coverage with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
pestphp/pest Version ^4.0
pestphp/pest-plugin Version ^4.0
pestphp/pest-plugin-arch Version ^4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package dashworthy/pest-plugin-arch-coverage contains the following files

Loading the files please wait ...