Download the PHP package guitarneck/taphp without Composer

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

cirrus-ci - test php5.6 cirrus-ci - test php7.4 cirrus-ci - test php8.0


taphp

TAP producer library for PHP. Based on tape for node.

This library is not psr-0/4 compliant. Indeed, its contains functions to organize the running tests that make it unfriendly with composer's autoload way.

Tested on PHP versions : 5.6.9, 7.4.13 ,8.0.0

example

with composer :

without composer :

TAPHP

This class is a singleton.

instance()

Returns the instance for this class. If realy you need it.

discardExit ()

This method prevents TAPHP to terminate with an exit code. It can be usefull in some circonstances, when tasks still to be done.

functions

The functions and methods are nearly the same than in tape, with some differents due to PHP language.

The so called deep methods are here for compliance with tape. PHP does it nativly.

only ( [$name], [$options], $callback )

Declare a test that will be the only one to be runned.

skip ( [$name], [$options], $callback )

Declare a test that will be skipped. It won't run.

test ( [$name], [$options], $callback )

Declare a new test. $name and $options are optional. $callback will be fired after preceding one's, with a parameter giving access to TAPHP object's methods.

todo ( [$name], [$options], $callback )

Declare a test that still needs to do. Failure will be allowed.

options

Available options are:

methods

assert ( $condition, [$text] )

Assert that condition is truthy with an optional description of the assertion $text.

Aliases: ok, true

bailout ( [$text] )

Generate an immediate exit and stop of all the tests with and optional $text as reason.

comment ( $text )

Generate a comment with a message $text.

deepEqual ( $any, $val, [$text] )

Assert that $any === $val with an optional description of the assertion $text.

Aliases: deepEquals, isEquivalent, same, deep_equal

deepLooseEqual ( $any, $val, [$text] )

Assert that $any == $val with an optional description of the assertion $text.

Aliases: deep_loose_equal

end ( [$error] )

Declare the end of a test, with an optional generated $error.

error ( $error, [$text] )

Generate a failure for a given $error, as an object type of Exception, with an optional $test description.

Aliases: ifError, ifErr, iferror, if_error

exception ( $exception, [$text] )

Generate a failure for a given $exception, as an object type of Exception, with an optional $test description.

Aliases: ifException, ifExcept, ifExpt, ifExp, ifexception, if_exception

fail ( [$text], [$options] )

Generate a failing assertion with a message $text.

looseEqual ( $any, $val, [$text] )

Assert that $any == $val with an optional description of the assertion $text.

Aliases: looseEquals, loose_equal

no ( $condition, [$text] )

Assert that condition is falsy with an optional description of the assertion $text.

Aliases: notOK, false, notok, not_ok

notDeepEqual ( $any, $val, [$text] )

Assert that $any !== $val with an optional description of the assertion $text.

Aliases: notDeepEquals, notEquivalent, notDeeply, notSame, isNotDeepEqual, isNotDeeply, isNotEquivalent, isInequivalent, not_deep_equal, not_same

notDeepLooseEqual ( $any, $val, [$text] )

Assert that $any != $val with an optional description of the assertion $text.

Aliases: not_deep_loose_equal

notLooseEqual ( $any, $val, [$text] )

Assert that $any != $val with an optional description of the assertion $text.

Aliases: notLooseEquals, not_loose_equal

notStrictEqual ( $any, $val, [$text] )

Assert that $any !== $val with an optional description of the assertion $text.

Aliases: notEqual, notEquals, isNotEqual, doesNotEqual, isInequal, notStrictEquals, isNot, not, not_strict_equal, not_equal, is_not_equal, is_not

pass ( [$text], [$options] )

Generate a passing assertion with a message $text.

plan ( $n )

Declare the number of assertions that's about to be runned. end() will be called automatically after, or an error occurs if the number of assertions doesn't match.

restoreTimeLimit ()

Restore PHP max_execution_time.

setTimeLimit ( $seconds )

Change PHP max_execution_time.

skip ( [$text], [$options] )

Generate a skip with and optional $text ane leaving the running test.

strictEqual ( $any, $val, [$text] )

Assert that $any === $val with an optional description of the assertion $text.

Aliases: equal, equals, isEqual, strictEquals, is, strict_equal, is_equal

test ( [$name], [$options], $callback )

Generate a new test at run time.

throws ( $thrower, [$throwed], [$text] )

Assert that the function call $thrower throws an exception. $throwed can be a string, a regular expression, an exception, an array describing some exception properties, or null.

timeout ( $callback, $ms, [$text] )

Generate an assertion that should run before $ms microseconds are elapse. Or it fails with an optional $text.

todo ( [$text], [$options] )

Generate a todo with and optional $text inside a test, switching the next assertions to todo mode.


License

MIT © guitarneck


All versions of taphp with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
composer-runtime-api Version ^2.0.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 guitarneck/taphp contains the following files

Loading the files please wait ....