summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.travis.yml13
-rw-r--r--phpunit.xml23
-rw-r--r--tests/Bootstrap.php10
-rw-r--r--tests/README.md2
4 files changed, 37 insertions, 11 deletions
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 000000000..c5a999359
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,13 @@
+language: php
+
+phps:
+ - 5.2
+ - 5.3
+ - 5.4
+
+before_script:
+ - pyrus channel-discover pear.php-tools.net
+ - pyrus install http://pear.php-tools.net/get/vfsStream-0.11.2.tgz
+ - phpenv rehash
+
+script: phpunit --configuration phpunit.xml \ No newline at end of file
diff --git a/phpunit.xml b/phpunit.xml
index 07f5a195d..2ae7ba3b8 100644
--- a/phpunit.xml
+++ b/phpunit.xml
@@ -1,6 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
-<phpunit bootstrap="tests/Bootstrap.php" colors="true">
+<phpunit
+ bootstrap="tests/Bootstrap.php"
+ colors="true"
+ convertNoticesToExceptions="true"
+ convertWarningsToExceptions="true"
+ stopOnError="false"
+ stopOnFailure="false"
+ stopOnIncomplete="false"
+ stopOnSkipped="false">
<testsuites>
<testsuite name="CodeIgniter Core Test Suite">
<file>tests/codeigniter/Setup_test.php</file>
@@ -14,4 +22,17 @@
</testsuite>
</testsuites>
+ <filters>
+ <blacklist>
+ <directory suffix=".php">PEAR_INSTALL_DIR</directory>
+ <directory suffix=".php">PHP_LIBDIR</directory>
+ <directory suffix=".php">PROJECT_BASE.'tests'</directory>
+ <directory suffix=".php">'../system/core/CodeIgniter.php'</directory>
+ </blacklist>
+ <whitelist>
+ <!--
+ <directory suffix=".php">'../system/core'</directory>
+ -->
+ </whitelist>
+ </filters>
</phpunit> \ No newline at end of file
diff --git a/tests/Bootstrap.php b/tests/Bootstrap.php
index 657671ab0..94dafdce4 100644
--- a/tests/Bootstrap.php
+++ b/tests/Bootstrap.php
@@ -17,14 +17,4 @@ define('APPPATH', PROJECT_BASE.'application/');
require_once $dir.'/lib/common.php';
require_once $dir.'/lib/ci_testcase.php';
-
-// Omit files in the PEAR & PHP Paths from ending up in the coverage report
-PHP_CodeCoverage_Filter::getInstance()->addDirectoryToBlacklist(PEAR_INSTALL_DIR);
-PHP_CodeCoverage_Filter::getInstance()->addDirectoryToBlacklist(PHP_LIBDIR);
-PHP_CodeCoverage_Filter::getInstance()->addDirectoryToBlacklist(PROJECT_BASE.'tests');
-
-// Omit Tests from the coverage reports.
-// PHP_CodeCoverage_Filter::getInstance()->addDirectoryToWhiteList('../system/core');
-PHP_CodeCoverage_Filter::getInstance()->addFileToBlackList('../system/core/CodeIgniter.php');
-
unset($dir); \ No newline at end of file
diff --git a/tests/README.md b/tests/README.md
index ad8051618..6d83c34d8 100644
--- a/tests/README.md
+++ b/tests/README.md
@@ -1,5 +1,7 @@
# CodeIgniter Unit Tests #
+Status : [![Build Status](https://secure.travis-ci.org/EllisLab/CodeIgniter.png?branch=feature/unit-tests)](http://travis-ci.org/EllisLab/CodeIgniter)
+
*Do not merge to default until these issues have been addressed*
- Clean up naming conventions