Merge pull request #386 from owncloud/unit-tests
It's good time to test everything
This commit is contained in:
commit
1ca0e1cd3b
@ -1,4 +1,4 @@
|
|||||||
<project name="owncloud-firstrunwizard" basedir="." default="test">
|
<project name="owncloud-documents" basedir="." default="test">
|
||||||
|
|
||||||
<!-- test - Tests if the code syntax is correct and executes phpunit tests -->
|
<!-- test - Tests if the code syntax is correct and executes phpunit tests -->
|
||||||
<target name="test">
|
<target name="test">
|
||||||
|
16
tests/bootstrap.php
Normal file
16
tests/bootstrap.php
Normal file
@ -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;
|
26
tests/phpunit.xml
Normal file
26
tests/phpunit.xml
Normal file
@ -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>
|
Loading…
x
Reference in New Issue
Block a user