Skip to content

Instantly share code, notes, and snippets.

@dpb587
Created April 21, 2012 01:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dpb587/2433139 to your computer and use it in GitHub Desktop.
Save dpb587/2433139 to your computer and use it in GitHub Desktop.
phpunit via composer
{
"repositories" : [
{
"type" : "composer",
"url" : "file:///tmp/phpunit-via-composer"
}
],
"require" : {
"pear-phpunit/PHPUnit" : "3.6.10"
}
}
wget http://pear.phpunit.de/packages.json
sed -i 's/"pear-symfony\\\/YAML"/"symfony\/yaml"/g' packages.json
sed -i 's/"http:\\\/\\\/pear.phpunit.de\\\/get\\\/pear-phpunit\\\//"http:\\\/\\\/pear.phpunit.de\\\/get\\\//g' packages.json
#!/usr/bin/env php
<?php
require_once __DIR__.'/vendor/autoload.php';
$paths = get_include_path();
foreach (glob(__DIR__.'/vendor/pear-phpunit/*') as $path) {
$paths .= PATH_SEPARATOR . $path;
}
set_include_path($paths);
require_once 'PHPUnit/Autoload.php';
PHPUnit_TextUI_Command::main();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment