Download the PHP package parf/spartan-test without Composer

On this page you can find all versions of the php package parf/spartan-test. 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 spartan-test

Spartan Test

PHP 8+ unit and web tests that read like PHP and run like scripts.

Spartan Test is a small testing framework for developers who want tests to stay close to the code they exercise. A test is an ordinary PHP expression followed by its expected result, all inside a simple executable .stest file.

Run it directly:

That is a complete test.

✦ What Makes It Distinctive

How A Test File Works

Each entry has a simple role:

Spartan Test captures:

When an expected result is absent, the first run adds its canonical PHP representation to the file. A later value change fails normally. Use --generate when updating stored results is intentional.

You can also use focused matchers when an exact value is unnecessary:

Setup code supports normal PHP syntax. Multi-line PHP works as expected; only the first physical line needs the ; setup prefix.

◎ Unit And Web Testing

Unit-style tests call PHP directly:

Web tests keep cookies and referrers between requests and can check pages, redirects, JSON APIs, headers, XPath results, and response content:

See Web Tests for the request syntax and runnable examples.

Running Tests

Use stest-all for a repository:

By default, suite discovery includes executable and non-executable .stest files, while skipping hidden paths, vendor, and node_modules. Install fd for faster discovery in large repositories; systems without it automatically use find. GNU Parallel powers suite execution.

Run stest --help or stest-all --help for all CLI options.

◆ Application Integration

Spartan Test searches the test directory and its parents for configuration and common bootstrap files:

Use --init=/path/to/bootstrap.php for a one-off override, or configure your project in stest-config.json / stest-config.local.json.

Installation

Requirements:

Composer

Git

Learn More

Start with the first test, then explore advanced result matching.


All versions of spartan-test with dependencies

PHP Build Version
Package Version
Requires php Version >=8.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 parf/spartan-test contains the following files

Loading the files please wait ...