Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/data_request.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2018-06-14 15:46:20 +0300
committerArthur Schiwon <blizzz@arthur-schiwon.de>2018-06-15 01:10:38 +0300
commit3f95d819e9b459c4f6dd7d24d9925d5e6d1357c1 (patch)
treecaad70df38e3b1321d9d8aed1beda69174a94012 /tests
parent373974a40de7a193c620413382512efd4da7dcc4 (diff)
fix drone config
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/Services/RequestTest.php12
-rw-r--r--tests/unit/bootstrap.php3
2 files changed, 11 insertions, 4 deletions
diff --git a/tests/unit/Services/RequestTest.php b/tests/unit/Services/RequestTest.php
index 5dcfd08..b712351 100644
--- a/tests/unit/Services/RequestTest.php
+++ b/tests/unit/Services/RequestTest.php
@@ -163,15 +163,24 @@ class RequestTest extends \Test\TestCase {
public function adminProvider() {
$admin1 = $this->createMock(IUser::class);
+
$admin2 = $this->createMock(IUser::class);
$admin2->expects($this->any())
->method('getEMailAddress')
->willReturn('admin2@sindar.gov');
+
$admin3 = $this->createMock(IUser::class);
$admin3->expects($this->any())
->method('getEMailAddress')
->willReturn('admin3@sindar.gov');
+ $admin4 = $this->createMock(IUser::class);
+
+ $admin5 = $this->createMock(IUser::class);
+ $admin5->expects($this->any())
+ ->method('getEMailAddress')
+ ->willReturn('admin5@sindar.gov');
+
return [
[
[ $admin1 ],
@@ -182,7 +191,7 @@ class RequestTest extends \Test\TestCase {
1
],
[
- [ $admin1, $admin2, $admin3 ],
+ [ $admin3, $admin4, $admin5 ], // for whatever reasons, reusing $admin1 and $admin2 would fail on CI
2
]
];
@@ -209,6 +218,7 @@ class RequestTest extends \Test\TestCase {
$this->expectException(HintedRuntime::class);
}
$result = $this->invokePrivate($this->service, 'getAdmins');
+
$this->assertSame($adminsWithEmail, count($result));
}
diff --git a/tests/unit/bootstrap.php b/tests/unit/bootstrap.php
index 839317f..cbfa0d9 100644
--- a/tests/unit/bootstrap.php
+++ b/tests/unit/bootstrap.php
@@ -25,7 +25,4 @@ if (!defined('PHPUNIT_RUN')) {
require_once __DIR__.'/../../../../lib/base.php';
\OC::$loader->addValidRoot(\OC::$SERVERROOT . '/tests');
\OC_App::loadApp('data_request');
-if(!class_exists('PHPUnit_Framework_TestCase')) {
- require_once('PHPUnit/Autoload.php');
-}
OC_Hook::clear();