summaryrefslogtreecommitdiff
path: root/tests/unit/bootstrap.php
diff options
context:
space:
mode:
authorFabio Bas <ctrlaltca@gmail.com>2013-09-17 09:45:24 +0200
committerFabio Bas <ctrlaltca@gmail.com>2013-09-17 09:45:24 +0200
commit7dbca97c478e34b2d7a7c47f1bc18ba7d7ce1525 (patch)
tree381bda2e192ecfae33c83d7f1c972894bc1cf562 /tests/unit/bootstrap.php
parent4117b88528ba9a7d3fbdf3248aeb8ca0f7c37455 (diff)
Chnages in phpunit's bootstrap script; should hopefully fix travis
Diffstat (limited to 'tests/unit/bootstrap.php')
-rw-r--r--tests/unit/bootstrap.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/unit/bootstrap.php b/tests/unit/bootstrap.php
new file mode 100644
index 00000000..97836012
--- /dev/null
+++ b/tests/unit/bootstrap.php
@@ -0,0 +1,20 @@
+<?php
+/**
+ * A few common settings for all unit tests.
+ *
+ * Also remember do define the @package attribute for your test class to make it appear under
+ * the right package in unit test and code coverage reports.
+ */
+
+define('PRADO_TEST_RUN', true);
+define('PRADO_FRAMEWORK_DIR', dirname(__FILE__).'/../../framework');
+define('VENDOR_DIR', dirname(__FILE__).'/../../vendor');
+set_include_path(PRADO_FRAMEWORK_DIR.PATH_SEPARATOR.get_include_path());
+
+if (!@include_once VENDOR_DIR.'/autoload.php') {
+ die('You must set up the project dependencies, run the following commands:
+ wget http://getcomposer.org/composer.phar
+ php composer.phar install');
+}
+
+require_once(PRADO_FRAMEWORK_DIR.'/prado.php'); \ No newline at end of file