summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Eberlei <kontakt@beberlei.de>2012-05-21 11:45:28 +0200
committerBenjamin Eberlei <kontakt@beberlei.de>2012-05-21 11:45:28 +0200
commit93ddf1d29ff26fc7964ae6a2e977930beb66078d (patch)
treeaf352eff9aa654bbd77088b9cd5abc11eda72b6d
parent5db07931d3a87eeafeca697f0ec32271efc2a2ed (diff)
downloadzetacomponents-graph-93ddf1d29ff26fc7964ae6a2e977930beb66078d.zip
zetacomponents-graph-93ddf1d29ff26fc7964ae6a2e977930beb66078d.tar.gz
Prepare test dependencies.
-rw-r--r--.gitignore3
-rw-r--r--composer.json12
-rw-r--r--phpunit.xml.dist14
-rw-r--r--tests/bootstrap.php14
4 files changed, 40 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..7d1acbf
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+vendor
+run-tests-tmp
+extract \ No newline at end of file
diff --git a/composer.json b/composer.json
index 9f8b5fa..39a5008 100644
--- a/composer.json
+++ b/composer.json
@@ -47,7 +47,13 @@
},
"description": "A component for creating pie charts, line graphs and other kinds of diagrams.",
"homepage": "https://github.com/zetacomponents",
- "license": "apache2",
+ "license": "Apache-2.0",
"name": "zetacomponents/graph",
- "type": "library"
-}
+ "type": "library",
+ "require": {
+ "zetacomponents/base": "*"
+ },
+ "require-dev": {
+ "zetacomponents/unit-test": "*"
+ }
+} \ No newline at end of file
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
new file mode 100644
index 0000000..7f36756
--- /dev/null
+++ b/phpunit.xml.dist
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<phpunit bootstrap="./tests/bootstrap.php" colors="true">
+ <testsuites>
+ <testsuite name="Zeta Components Graph">
+ <directory suffix="_test.php">./tests</directory>
+ </testsuite>
+ </testsuites>
+
+ <filter>
+ <whitelist>
+ <directory>./src</directory>
+ </whitelist>
+ </filter>
+</phpunit> \ No newline at end of file
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
new file mode 100644
index 0000000..fa79cb1
--- /dev/null
+++ b/tests/bootstrap.php
@@ -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
+ );
+}
OpenPOWER on IntegriCloud