Download the PHP
package swew/test without Composer
On this page you can find all versions of the php package
swew/test. It is possible to download/install
these versions without Composer. Possible dependencies are resolved
automatically.
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.
A PHP test framework that solves the fatal flaw of all others.
This composer package is a lightweight and fast testing library designed to provide an informative interface. It offers a variety of testing features, including unit testing, integration testing, and functional testing. The package is designed to make testing simple and easy, allowing developers to quickly identify and fix bugs in their code. With its fast and efficient testing tools, developers can ensure that their code is reliable and performs well in real-world scenarios.
It's designed to help you write tests quickly and stick to TDD.
Packages developed by SWEW
swew/cli - A command-line interface program with formatting and text entry functions.
swew/test - A test framework that is designed to fix the fatal flaw of other test frameworks.
swew/db - A lightweight, fast, and secure PHP library for interacting with databases, creating migrations, and running queries.
swew/dd - The simplest way to debug variables. As in Laravel.
Quick start
Installation
Next to the composer.json file, a config file will be created for tests - swew.json.
Now you can start writing tests.
Get started
All tests, by default, are in files with the ending *.spec.php or *.test.php. For example the path to the file may be as follows: tests/Unit/string-utils.spec.php.
To write the test itself, you only need a few functions.
Name
Description
it
container for the test case
expect
function, to check the test case, must be inside it
Requiresphp Version
>=8.1 ext-json Version
* swew/cli Version
^1.1.17 swew/dd Version
^1.3.1 ext-mbstring Version
*
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 swew/test contains the following files
Loading the files please wait ....
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.