Download the PHP package inventor96/fatfree-test-manager without Composer

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

Fat-Free Test Manager

A lightweight class to run and report the results from unit tests using the Fat-Free Framework Test class.

Installation

Usage

The goal of this tool is to be as simple and lightweight as possible.

Overview

The idea is that we'll scan one folder (non-recursively) for all files that end with Test.php (e.g. MyAwesomeTest.php). For each of the files found, we find the first class definition, instantiate that class, and then call all public methods in that class that start with test (e.g. public function testIfThisWorks() { ... }).

With this structure in place, simply call TestManager::runAndReportTests('directory/with/test/files');.

Extending TestBase

The test classes must extend TestBase, directly or indirectly. If indirectly (the test classes extend another class that extends TestBase), the constructor of the class(es) in the middle will want to pass an array as the second parameter to the parent constructor of class names that includes their own. This will allow the report to include the correct class and method name of the testing method.

For example:

Running code before/after test classes and methods

If a test class (or a class it extends) has a method named preClass(), preTest(), postTest(), or postClass(); each method will be called at the respective time.

Method Called Time
preClass() Immediately after the class is instantiated
preTest() Before each test*() method in the class
postTest() After each test*() method in the class
postClass() After all tests in the class have been run, and postTest() has been called (if present)

Multiple Folders

If you have more than one folder with tests, you can create an instance of the Fat-Free Framework Test class and call TestManager::runTests('a/directory/with/tests', $your_instance_of_Test); for each directory, then call TestManager::reportTests($your_instance_of_Test); at the end.

Exit Codes

By default, runAndReportTests() and reportTests() will end the PHP process with an exit code of 1 if there were failed tests, or 0 if all were successful. To disable this behavior and allow the script to continue, set the last parameter to false.

General Example

example_dir/ExampleTest.php:

example_dir/test_runner.php:

Running the tests would look like this:


All versions of fatfree-test-manager with dependencies

PHP Build Version
Package Version
Requires bcosca/fatfree-core Version ^3.7
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 inventor96/fatfree-test-manager contains the following files

Loading the files please wait ....