summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-11-05 16:34:02 +0100
committerBernhard Posselt <dev@bernhard-posselt.com>2014-11-05 16:34:02 +0100
commit50b3e9a088e67f626862c02a03b8663b767cd9f6 (patch)
tree1b7cfd370fb833dc36811a672fd4d86c5e3bf2b8
parent17e16cf46fe9cf605aa0c761e71251ecc0c48724 (diff)
add integration test xml
-rw-r--r--.travis.yml2
-rw-r--r--phpunit.integration.xml7
-rw-r--r--phpunit.xml8
-rw-r--r--tests/integration/bootstrap.php4
-rw-r--r--tests/integration/db/ItemMapperTest.php2
5 files changed, 19 insertions, 4 deletions
diff --git a/.travis.yml b/.travis.yml
index 26e3212ea..a5dfa597b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -51,7 +51,7 @@ before_script:
script:
# php unit tests
- - phpunit --coverage-clover=coverage.clover tests/unit
+ - phpunit --coverage-clover=coverage.clover -c phpunit.xml
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover
- cd js/
diff --git a/phpunit.integration.xml b/phpunit.integration.xml
new file mode 100644
index 000000000..fd074837c
--- /dev/null
+++ b/phpunit.integration.xml
@@ -0,0 +1,7 @@
+<phpunit bootstrap="tests/integration/bootstrap.php">
+<testsuites>
+ <testsuite name="integration">
+ <directory>./tests/integration</directory>
+ </testsuite>
+</testsuites>
+</phpunit> \ No newline at end of file
diff --git a/phpunit.xml b/phpunit.xml
index 81da016e9..2ecdaa33d 100644
--- a/phpunit.xml
+++ b/phpunit.xml
@@ -1 +1,7 @@
-<phpunit bootstrap="tests/classloader.php"></phpunit> \ No newline at end of file
+<phpunit bootstrap="tests/classloader.php">
+<testsuites>
+ <testsuite name="unit">
+ <directory>./tests/unit</directory>
+ </testsuite>
+</testsuites>
+</phpunit> \ No newline at end of file
diff --git a/tests/integration/bootstrap.php b/tests/integration/bootstrap.php
index effe2fe9d..de6ad1cbe 100644
--- a/tests/integration/bootstrap.php
+++ b/tests/integration/bootstrap.php
@@ -3,6 +3,10 @@ namespace OCA\News\Tests\Integration;
require_once __DIR__ . '/../../../../lib/base.php';
+\OC_App::loadApps();
+\OC_User::setupBackends();
+\OC_Util::setupFS();
+
class NewsIntegrationTest extends \PHPUnit_Framework_TestCase {
diff --git a/tests/integration/db/ItemMapperTest.php b/tests/integration/db/ItemMapperTest.php
index fa9d438f8..97956b28d 100644
--- a/tests/integration/db/ItemMapperTest.php
+++ b/tests/integration/db/ItemMapperTest.php
@@ -2,8 +2,6 @@
namespace OCA\News\Db;
-require_once __DIR__ . '/../bootstrap.php';
-
use \OCA\News\AppInfo\Application;
use \OCA\News\Tests\Integration\NewsIntegrationTest;