change configuration.xml and add bootstrap.php
Signed-off-by: Jonas Sulzer <jonas@violoncello.ch>
This commit is contained in:
15
tests/bootstrap.php
Normal file
15
tests/bootstrap.php
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
if (!defined('PHPUNIT_RUN')) {
|
||||||
|
define('PHPUNIT_RUN', 1);
|
||||||
|
}
|
||||||
|
require_once __DIR__ . '/../../../lib/base.php';
|
||||||
|
if (!class_exists('\PHPUnit\Framework\TestCase')) {
|
||||||
|
require_once('PHPUnit/Autoload.php');
|
||||||
|
}
|
||||||
|
\OC_App::loadApp('user_external');
|
||||||
|
|
||||||
|
$dummyClass = \OC::$SERVERROOT . '/tests/lib/Util/User/Dummy.php';
|
||||||
|
if(file_exists($dummyClass)) {
|
||||||
|
require_once($dummyClass);
|
||||||
|
}
|
||||||
|
OC_Hook::clear();
|
||||||
@@ -1,25 +1,30 @@
|
|||||||
<project name="user_external" basedir="tests" default="test">
|
<phpunit bootstrap="bootstrap.php"
|
||||||
|
verbose="true"
|
||||||
|
timeoutForSmallTests="900"
|
||||||
|
timeoutForMediumTests="900"
|
||||||
|
timeoutForLargeTests="900"
|
||||||
|
>
|
||||||
|
|
||||||
<property file="build.properties"/>
|
<testsuites>
|
||||||
|
<testsuite name="External User Authentication App Tests">
|
||||||
|
<directory suffix=".php">.</directory>
|
||||||
|
<exclude>config.php</exclude>
|
||||||
|
</testsuite>
|
||||||
|
</testsuites>
|
||||||
|
|
||||||
<!-- test - Tests if the code syntax is correct and executes phpunit tests -->
|
<!-- filters for code coverage -->
|
||||||
<target name="test">
|
<filter>
|
||||||
<apply executable="php" failonerror="true">
|
<whitelist>
|
||||||
<arg value="-l" />
|
<directory suffix=".php">../../user_external</directory>
|
||||||
<fileset dir=".">
|
<exclude>
|
||||||
<include name="**/*.php" />
|
<directory suffix=".php">../../user_external/l10n</directory>
|
||||||
<exclude name="**/l10n/**" />
|
<directory suffix=".php">../../user_external/tests</directory>
|
||||||
</fileset>
|
</exclude>
|
||||||
</apply>
|
</whitelist>
|
||||||
|
</filter>
|
||||||
|
<logging>
|
||||||
|
<!-- and this is where your report will be written -->
|
||||||
|
<log type="coverage-clover" target="./clover.xml"/>
|
||||||
|
</logging>
|
||||||
|
|
||||||
<!--<exec executable="phpunit" failonerror="true">-->
|
</phpunit>
|
||||||
<!--<arg value="-c" />-->
|
|
||||||
<!--<arg path="${build.src.dir}/app/"/>-->
|
|
||||||
<!--<arg value="- -log-junit" />-->
|
|
||||||
<!--<arg path="${report.dir}/phpunit.xml"/>-->
|
|
||||||
<!--<arg value="- -coverage-clover" />-->
|
|
||||||
<!--<arg path=" ${report.dir}/clover.xml"/>-->
|
|
||||||
<!--</exec>-->
|
|
||||||
</target>
|
|
||||||
|
|
||||||
</project>
|
|
||||||
|
|||||||
Reference in New Issue
Block a user