Browse Source

Add bootstrap and initial phpunit config

tags/1.1.22
Victor Dubiniuk 5 years ago
parent
commit
9222f71fd7
2 changed files with 42 additions and 0 deletions
  1. 16
    0
      tests/bootstrap.php
  2. 26
    0
      tests/phpunit.xml

+ 16
- 0
tests/bootstrap.php View 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
- 0
tests/phpunit.xml View 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…
Cancel
Save