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

github.com/nextcloud/polls.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTortue Torche <tortuetorche@users.noreply.github.com>2019-12-10 13:55:53 +0300
committerTortue Torche <tortuetorche@users.noreply.github.com>2019-12-10 17:03:55 +0300
commit60e380ec7ec351694389cb32d85637ec2995a699 (patch)
tree5dca1d8c6f11a705e9dc6c902e859a6313c8d678 /tests
parent41930996829421bbf5e26aeb25c93d9214d35e9c (diff)
Try to fix tests!
Signed-off-by: Tortue Torche <tortuetorche@users.noreply.github.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/Unit/Controller/PageControllerTest.php4
-rw-r--r--tests/Unit/Db/CommentMapperTest.php4
-rw-r--r--tests/Unit/Db/EventMapperTest.php4
-rw-r--r--tests/Unit/Db/NotificationMapperTest.php4
-rw-r--r--tests/Unit/Db/OptionMapperTest.php4
-rw-r--r--tests/Unit/Db/VoteMapperTest.php4
-rw-r--r--tests/Unit/UnitTestCase.php6
-rw-r--r--tests/bootstrap.php3
8 files changed, 15 insertions, 18 deletions
diff --git a/tests/Unit/Controller/PageControllerTest.php b/tests/Unit/Controller/PageControllerTest.php
index 651b7d28..0649dfea 100644
--- a/tests/Unit/Controller/PageControllerTest.php
+++ b/tests/Unit/Controller/PageControllerTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/**
* @copyright Copyright (c) 2017 Kai Schröer <git@schroeer.co>
*
@@ -37,7 +37,7 @@ class PageControllerTest extends UnitTestCase {
/**
* {@inheritDoc}
*/
- public function setUp() {
+ protected function setUp(): void {
$avatarManager = $this->getMockBuilder('OCP\IAvatarManager')
->disableOriginalConstructor()
->getMock();
diff --git a/tests/Unit/Db/CommentMapperTest.php b/tests/Unit/Db/CommentMapperTest.php
index 7cd845dd..a66ca3fd 100644
--- a/tests/Unit/Db/CommentMapperTest.php
+++ b/tests/Unit/Db/CommentMapperTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/**
* @copyright Copyright (c) 2017 Kai Schröer <git@schroeer.co>
*
@@ -43,7 +43,7 @@ class CommentMapperTest extends UnitTestCase {
/**
* {@inheritDoc}
*/
- public function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->con = \OC::$server->getDatabaseConnection();
$this->commentMapper = new CommentMapper($this->con);
diff --git a/tests/Unit/Db/EventMapperTest.php b/tests/Unit/Db/EventMapperTest.php
index 3c7b1a8f..e2a122fc 100644
--- a/tests/Unit/Db/EventMapperTest.php
+++ b/tests/Unit/Db/EventMapperTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/**
* @copyright Copyright (c) 2017 Kai Schröer <git@schroeer.co>
*
@@ -39,7 +39,7 @@ class EventMapperTest extends UnitTestCase {
/**
* {@inheritDoc}
*/
- public function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->con = \OC::$server->getDatabaseConnection();
$this->eventMapper = new EventMapper($this->con);
diff --git a/tests/Unit/Db/NotificationMapperTest.php b/tests/Unit/Db/NotificationMapperTest.php
index 96d67226..6f07eb50 100644
--- a/tests/Unit/Db/NotificationMapperTest.php
+++ b/tests/Unit/Db/NotificationMapperTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/**
* @copyright Copyright (c) 2017 Kai Schröer <git@schroeer.co>
*
@@ -43,7 +43,7 @@ class NotificationMapperTest extends UnitTestCase {
/**
* {@inheritDoc}
*/
- public function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->con = \OC::$server->getDatabaseConnection();
$this->notificationMapper = new NotificationMapper($this->con);
diff --git a/tests/Unit/Db/OptionMapperTest.php b/tests/Unit/Db/OptionMapperTest.php
index b531b6dc..73ec5752 100644
--- a/tests/Unit/Db/OptionMapperTest.php
+++ b/tests/Unit/Db/OptionMapperTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/**
* @copyright Copyright (c) 2017 Kai Schröer <git@schroeer.co>
*
@@ -43,7 +43,7 @@ class OptionMapperTest extends UnitTestCase {
/**
* {@inheritDoc}
*/
- public function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->con = \OC::$server->getDatabaseConnection();
$this->optionMapper = new OptionMapper($this->con);
diff --git a/tests/Unit/Db/VoteMapperTest.php b/tests/Unit/Db/VoteMapperTest.php
index db4dbd6f..3a1c2f27 100644
--- a/tests/Unit/Db/VoteMapperTest.php
+++ b/tests/Unit/Db/VoteMapperTest.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/**
* @copyright Copyright (c) 2017 Kai Schröer <git@schroeer.co>
*
@@ -43,7 +43,7 @@ class VoteMapperTest extends UnitTestCase {
/**
* {@inheritDoc}
*/
- public function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->con = \OC::$server->getDatabaseConnection();
$this->voteMapper = new VoteMapper($this->con);
diff --git a/tests/Unit/UnitTestCase.php b/tests/Unit/UnitTestCase.php
index 7469aff1..6be39d40 100644
--- a/tests/Unit/UnitTestCase.php
+++ b/tests/Unit/UnitTestCase.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
/**
* @copyright Copyright (c) 2017 Kai Schröer <git@schroeer.co>
*
@@ -24,7 +24,7 @@
namespace OCA\Polls\Tests\Unit;
use League\FactoryMuffin\FactoryMuffin;
-use PHPUnit_Framework_TestCase;
+use PHPUnit\Framework\TestCase as PHPUnit_Framework_TestCase;
abstract class UnitTestCase extends PHPUnit_Framework_TestCase {
@@ -34,7 +34,7 @@ abstract class UnitTestCase extends PHPUnit_Framework_TestCase {
/**
* {@inheritDoc}
*/
- public function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->fm = new FactoryMuffin();
$this->fm->loadFactories(__DIR__ . '/Factories');
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
index f840332b..0e518521 100644
--- a/tests/bootstrap.php
+++ b/tests/bootstrap.php
@@ -31,8 +31,5 @@ require_once __DIR__ . '/../vendor/autoload.php';
\OC::$loader->addValidRoot(OC::$SERVERROOT . '/tests');
\OC_App::loadApp('polls');
-if (!class_exists('PHPUnit_Framework_TestCase')) {
- require_once 'PHPUnit/Autoload.php';
-}
\OC_Hook::clear();