Skip to content

Commit

Permalink
Prepare test dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
beberlei committed May 21, 2012
1 parent 996d9d9 commit 2466c69
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
vendor
run-tests-tmp
extract
12 changes: 9 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,13 @@
},
"description": "The Url package provides basic operations to handle urls (parse, build, get/set path, get/set query).",
"homepage": "https://github.com/zetacomponents",
"license": "apache2",
"license": "Apache-2.0",
"name": "zetacomponents/url",
"type": "library"
}
"type": "library",
"require": {
"zetacomponents/base": "*"
},
"require-dev": {
"zetacomponents/unit-test": "*"
}
}
14 changes: 14 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="./tests/bootstrap.php" colors="true">
<testsuites>
<testsuite name="Zeta Components Url">
<directory suffix="_test.php">./tests</directory>
</testsuite>
</testsuites>

<filter>
<whitelist>
<directory>./src</directory>
</whitelist>
</filter>
</phpunit>
14 changes: 14 additions & 0 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php
if ( ! @include __DIR__ . '/../vendor/.composer/autoload.php' )
{
die(<<<'EOT'
You must set up the project dependencies, run the following commands:
wget http://getcomposer.org/composer.phar
php composer.phar install --dev
You can then run tests by calling:
phpunit
EOT
);
}

0 comments on commit 2466c69

Please sign in to comment.