Download the PHP package skyzyx/phpt without Composer
On this page you can find all versions of the php package skyzyx/phpt. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package phpt
Short Description Parses PHPT unit test files into sections as key-value pairs.
License MIT
Homepage http://github.com/skyzyx/phpt
Informations about the package phpt
PHPT Component
Parses PHPT unit test files into sections as key-value pairs.
Example
Say, for example, you have this PHPT unit test:
--TEST--
Test that my code works!
--DESCRIPTION--
This test covers [blah, blah, blah...]
--CREDITS--
Zoe Slattery [email protected]
# TestFest Munich 2009-05-19
--FILE--
--EXPECT--
array(2) {
["hello"]=>
string(5) "World"
["goodbye"]=>
string(7) "MrChips"
}
You decide that you want to grab the contents of the FILE
header:
Installation
Install source from GitHub
To install the source code:
git clone git://github.com/skyzyx/phpt.git
And include it in your scripts:
require_once '/path/to/phpt/src/PHPT.php';
Install with Composer
If you're using Composer to manage dependencies, you can add PHP with it.
{
"require": {
"skyzyx/phpt": ">=1.1"
}
}
Using a Class Loader
If you're using a class loader (e.g., Symfony Class Loader):
$loader->registerNamespace('Skyzyx\\Components\\PHPT', 'path/to/vendor/phpt/src');
Tests
Tests are written in PHPT format. You can run them with either the PEAR Test Runner or with PHPUnit 3.6+.
cd tests/
pear run-tests .
...or...
cd tests/
phpunit .
License & Copyright
Copyright (c) 2010-2012 Ryan Parman. Licensed for use under the terms of the MIT license.