Download the PHP package rtens/scrut without Composer

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

Scrut Build Status

scrut is a full-fledged, light-weight xUnit-style test framework for PHP.

The Why

Why write another test framekwork for PHP? One could easily argue that there are already enough, and one would be right.

But apart from the fact, that writing a test framework is great fun, the main reason that lead me to doing so was that PhpUnit started to feel kinda heavy, especially as a requirement of the micro-libraries in my web application tool kit, and the alternatives didn't convince me. Other minor reasons where that I needed a more flexible testing framework for experimenting with test styles and always wanted a framework that is aligned with my work flow.

Installation

To use scrut in your project, require it with Composer

composer require "rtens/scrut"

If you would like to develop on scrut, clone it with git, download its dependencies with Composer and execute the specification with scrut itself (the bootstrapping is the major source of fun when writing test frameworks)

git clone https://github.com/rtens/scrut.git
cd scrut
composer install
vendor/bin/scrut

Usage

There are three ways to write tests with scrut which you can mix as you please.

Minimalistic

The easiest and most minimalistic way to write a test, avoiding all dependencies on scrut, is to create a class in a folder (e.g. spec) like this:

Note that you don't need to follow any naming convention. scrut will execute all public methods of all classes it finds in the folder you point it to. You can use the assert function or throw Exceptions to make a test fail.

If you now run vendor/bin/scrut spec you should get the following output.

The dot means that the first test passed, the F means that the second one failed and the reason is printed below followed by a summary of the test run.

Integrated

A more integrated way is let the test class extend StaticTestSuite and use the Assert class to make assertions.

The output of vendor/bin/scrut spec should now be

Note that the empty test method results in the test being marked as "incomplete" because no assertions are made.

Dynamic

If you're not a fan of creating classes, then you might like the third way using dynamically created objects.

which gets you

Documentation

The documentation of scrut is written in the form of an executable specification. You find it in the spec folder.

Contribution

I'm looking forward to any kind of contribution including feedback about how unnecessary this project is, bugs and suggestions for missing features. Just open a new issue or check out the open issues.


All versions of scrut with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5
watoki/factory Version 1.*
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 rtens/scrut contains the following files

Loading the files please wait ....