diff options
author | Victor Dubiniuk <victor.dubiniuk@gmail.com> | 2014-10-23 19:45:46 +0400 |
---|---|---|
committer | Victor Dubiniuk <victor.dubiniuk@gmail.com> | 2014-10-23 19:45:46 +0400 |
commit | 9222f71fd79ecfaaf7c058e945ec146a2ed592a1 (patch) | |
tree | 6fb7c2740945bf319f5ae57b132154d950257f08 /tests | |
parent | 128b8454cc9e8c13f7ca4c921f3be4477ea87ae1 (diff) |
Add bootstrap and initial phpunit config
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bootstrap.php | 16 | ||||
-rw-r--r-- | tests/phpunit.xml | 26 |
2 files changed, 42 insertions, 0 deletions
diff --git a/tests/bootstrap.php b/tests/bootstrap.php new file mode 100644 index 00000000..e69f5862 --- /dev/null +++ b/tests/bootstrap.php @@ -0,0 +1,16 @@ +<?php + +global $RUNTIME_NOAPPS; +$RUNTIME_NOAPPS = true; + +define('PHPUNIT_RUN', 1); + +require_once __DIR__.'/../../../lib/base.php'; +require_once __DIR__.'/../vendor/autoload.php'; + +if(!class_exists('PHPUnit_Framework_TestCase')) { + require_once('PHPUnit/Autoload.php'); +} + +OC_Hook::clear(); +OC_Log::$enabled = false; diff --git a/tests/phpunit.xml b/tests/phpunit.xml new file mode 100644 index 00000000..b8311273 --- /dev/null +++ b/tests/phpunit.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8" ?> +<phpunit bootstrap="bootstrap.php" + strict="true" + verbose="true" + timeoutForSmallTests="900" + timeoutForMediumTests="900" + timeoutForLargeTests="900" + > + <testsuite name='ownCloud - Documents App Tests'> + <directory suffix='test.php'>.</directory> + </testsuite> + <!-- filters for code coverage --> + <filter> + <whitelist> + <directory suffix=".php">../../mail</directory> + <exclude> + <directory suffix=".php">../../documents/l10n</directory> + <directory suffix=".php">../../documents/tests</directory> + </exclude> + </whitelist> + </filter> + <logging> + <!-- and this is where your report will be written --> + <log type="coverage-clover" target="./clover.xml"/> + </logging> +</phpunit>
\ No newline at end of file |