summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-02-05 14:35:11 -0800
committerThomas Müller <thomas.mueller@tmit.eu>2013-02-05 14:35:11 -0800
commit74157902d753ce09d60fe319f6eadd203f63b4b3 (patch)
tree99c3bd2d4cff224b82522b3fd876f68f79e31e6c /tests
parent5221ee0c5aaca5588e20683f397fec9d1d6e98c7 (diff)
parentcbf6b28f450e61d5072a079dac90980d03e0ecb7 (diff)
downloadnextcloud-server-74157902d753ce09d60fe319f6eadd203f63b4b3.tar.gz
nextcloud-server-74157902d753ce09d60fe319f6eadd203f63b4b3.zip
Merge pull request #1476 from owncloud/disable-error-handler-while-running-phpunit
disable error handler while running phpunit
Diffstat (limited to 'tests')
-rw-r--r--tests/bootstrap.php3
-rw-r--r--tests/lib/files/filesystem.php6
-rw-r--r--tests/phpunit-autotest.xml14
3 files changed, 20 insertions, 3 deletions
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
index b97161ee6e4..fb667263e45 100644
--- a/tests/bootstrap.php
+++ b/tests/bootstrap.php
@@ -2,6 +2,9 @@
global $RUNTIME_NOAPPS;
$RUNTIME_NOAPPS = true;
+
+define('PHPUNIT_RUN', 1);
+
require_once __DIR__.'/../lib/base.php';
if(!class_exists('PHPUnit_Framework_TestCase')) {
diff --git a/tests/lib/files/filesystem.php b/tests/lib/files/filesystem.php
index 5837093fdd6..fd116af2d2e 100644
--- a/tests/lib/files/filesystem.php
+++ b/tests/lib/files/filesystem.php
@@ -93,14 +93,14 @@ class Filesystem extends \PHPUnit_Framework_TestCase {
$rootView->mkdir('/'.$user);
$rootView->mkdir('/'.$user.'/files');
- \OC\Files\Filesystem::file_put_contents('/foo', 'foo');
+// \OC\Files\Filesystem::file_put_contents('/foo', 'foo');
\OC\Files\Filesystem::mkdir('/bar');
- \OC\Files\Filesystem::file_put_contents('/bar//foo', 'foo');
+// \OC\Files\Filesystem::file_put_contents('/bar//foo', 'foo');
$tmpFile = \OC_Helper::tmpFile();
file_put_contents($tmpFile, 'foo');
$fh = fopen($tmpFile, 'r');
- \OC\Files\Filesystem::file_put_contents('/bar//foo', $fh);
+// \OC\Files\Filesystem::file_put_contents('/bar//foo', $fh);
}
public function dummyHook($arguments) {
diff --git a/tests/phpunit-autotest.xml b/tests/phpunit-autotest.xml
new file mode 100644
index 00000000000..23cd123edc6
--- /dev/null
+++ b/tests/phpunit-autotest.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<phpunit bootstrap="bootstrap.php">
+ <testsuite name='ownCloud'>
+ <directory suffix='.php'>lib/</directory>
+ <file>apps.php</file>
+ </testsuite>
+ <!-- filters for code coverage -->
+ <whitelist processUncoveredFilesFromWhitelist="true">
+ <directory suffix=".php">..</directory>
+ <exclude>
+ <directory suffix=".php">../3rdparty</directory>
+ </exclude>
+ </whitelist>
+</phpunit>