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 -->
|
||||
<target name="test">
|
||||
<apply executable="php" failonerror="true">
|
||||
<arg value="-l" />
|
||||
<fileset dir=".">
|
||||
<include name="**/*.php" />
|
||||
<exclude name="**/l10n/**" />
|
||||
</fileset>
|
||||
</apply>
|
||||
<!-- filters for code coverage -->
|
||||
<filter>
|
||||
<whitelist>
|
||||
<directory suffix=".php">../../user_external</directory>
|
||||
<exclude>
|
||||
<directory suffix=".php">../../user_external/l10n</directory>
|
||||
<directory suffix=".php">../../user_external/tests</directory>
|
||||
</exclude>
|
||||
</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">-->
|
||||
<!--<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>
|
||||
</phpunit>
|
||||
|
||||
Reference in New Issue
Block a user