diff --git a/tests/unit/Activity/CommentEventHandlerTest.php b/tests/unit/Activity/CommentEventHandlerTest.php index 107ba10cf..07a88e1da 100644 --- a/tests/unit/Activity/CommentEventHandlerTest.php +++ b/tests/unit/Activity/CommentEventHandlerTest.php @@ -39,6 +39,8 @@ class CommentEventHandlerTest extends TestCase { private $activityManager; /** @var NotificationHelper */ private $notificationHelper; + /** @var ChangeHelper */ + private $changeHelper; /** @var CardMapper */ private $cardMapper; diff --git a/tests/unit/Activity/DeckProviderTest.php b/tests/unit/Activity/DeckProviderTest.php index 02b6be1c2..e018cc0e1 100644 --- a/tests/unit/Activity/DeckProviderTest.php +++ b/tests/unit/Activity/DeckProviderTest.php @@ -41,10 +41,12 @@ use PHPUnit_Framework_MockObject_MockObject as MockObject; class DeckProviderTest extends TestCase { - /** @var DeckProvider */ private $provider; + /** @var IL10N */ + private $l10n; + /** @var IURLGenerator|MockObject */ private $urlGenerator; @@ -57,6 +59,9 @@ class DeckProviderTest extends TestCase { /** @var ICommentsManager|MockObject */ private $commentsManager; + private $l10nFactory; + private $config; + /** @var CardService|MockObject */ private $cardService; @@ -71,7 +76,6 @@ public function setUp(): void { $this->commentsManager = $this->createMock(ICommentsManager::class); $this->l10nFactory = $this->createMock(IFactory::class); $this->config = $this->createMock(IConfig::class); - $this->config = $this->createMock(IConfig::class); $this->cardService = $this->createMock(CardService::class); $this->provider = new DeckProvider($this->urlGenerator, $this->activityManager, $this->userManager, $this->commentsManager, $this->l10nFactory, $this->config, $this->userId, $this->cardService); } diff --git a/tests/unit/Db/BoardMapperTest.php b/tests/unit/Db/BoardMapperTest.php index 82e611c69..f7189a158 100644 --- a/tests/unit/Db/BoardMapperTest.php +++ b/tests/unit/Db/BoardMapperTest.php @@ -38,6 +38,7 @@ class BoardMapperTest extends TestCase { /** @var IDBConnection */ private $dbConnection; + private $labelMapper; /** @var AclMapper|\PHPUnit\Framework\MockObject\MockObject */ private $aclMapper; /** @var BoardMapper */ diff --git a/tests/unit/Db/RelationalEntityTest.php b/tests/unit/Db/RelationalEntityTest.php index d9b4360b5..ffedbfd7f 100644 --- a/tests/unit/Db/RelationalEntityTest.php +++ b/tests/unit/Db/RelationalEntityTest.php @@ -23,18 +23,22 @@ namespace OCA\Deck\Db; +class MyRelationalEntity extends RelationalEntity { + protected $foo; +} + class RelationalEntityTest extends \Test\TestCase { public function testRelation() { - $entity = new RelationalEntity(); - $entity->foo = null; + $entity = new MyRelationalEntity(); + $entity->setFoo(null); $entity->addRelation('foo'); $entity->setFoo('test'); $this->assertEquals([], $entity->getUpdatedFields()); } public function testWithoutRelation() { - $entity = new RelationalEntity(); - $entity->foo = null; + $entity = new MyRelationalEntity(); + $entity->setFoo(null); $entity->setFoo('test'); $this->assertEquals(['foo' => true], $entity->getUpdatedFields()); } diff --git a/tests/unit/Middleware/ExceptionMiddlewareTest.php b/tests/unit/Middleware/ExceptionMiddlewareTest.php index c737fe672..546d645f9 100644 --- a/tests/unit/Middleware/ExceptionMiddlewareTest.php +++ b/tests/unit/Middleware/ExceptionMiddlewareTest.php @@ -41,6 +41,7 @@ class ExceptionMiddlewareTest extends \Test\TestCase { private $logger; /** @var IConfig */ private $config; + private $request; private $controller; private $exceptionMiddleware; diff --git a/tests/unit/Reference/CardReferenceProviderTest.php b/tests/unit/Reference/CardReferenceProviderTest.php index de2ac1362..e75efd228 100644 --- a/tests/unit/Reference/CardReferenceProviderTest.php +++ b/tests/unit/Reference/CardReferenceProviderTest.php @@ -34,6 +34,14 @@ use Test\TestCase; class CardReferenceProviderTest extends TestCase { + private $cardService; + private $boardService; + private $stackService; + private $urlGenerator; + private $l10n; + private $userId; + private $provider; + public function setUp() : void { parent::setUp(); diff --git a/tests/unit/Service/BoardServiceTest.php b/tests/unit/Service/BoardServiceTest.php index 2d9610058..f02e456ba 100644 --- a/tests/unit/Service/BoardServiceTest.php +++ b/tests/unit/Service/BoardServiceTest.php @@ -56,6 +56,8 @@ class BoardServiceTest extends TestCase { /** @var BoardService */ private $service; + /** @var IConfig */ + private $config; /** @var L10N */ private $l10n; /** @var LabelMapper */ diff --git a/tests/unit/Service/PermissionServiceTest.php b/tests/unit/Service/PermissionServiceTest.php index d0d236b2e..2a5d2b933 100644 --- a/tests/unit/Service/PermissionServiceTest.php +++ b/tests/unit/Service/PermissionServiceTest.php @@ -42,6 +42,9 @@ class PermissionServiceTest extends \Test\TestCase { + /** @var IRequest */ + private $request; + private $circlesService; /** @var PermissionService*/ private $service; /** @var ILogger */ diff --git a/tests/unit/controller/BoardApiControllerTest.php b/tests/unit/controller/BoardApiControllerTest.php index d74b0bd7d..21a8f8870 100644 --- a/tests/unit/controller/BoardApiControllerTest.php +++ b/tests/unit/controller/BoardApiControllerTest.php @@ -31,6 +31,7 @@ class BoardApiControllerTest extends \Test\TestCase { private $appName = 'deck'; + private $request; private $userId = 'admin'; private $controller; private $boardService; diff --git a/tests/unit/controller/BoardControllerTest.php b/tests/unit/controller/BoardControllerTest.php index 357219907..402fc72bc 100644 --- a/tests/unit/controller/BoardControllerTest.php +++ b/tests/unit/controller/BoardControllerTest.php @@ -28,6 +28,7 @@ use OCP\IUser; class BoardControllerTest extends \Test\TestCase { + private $l10n; private $controller; private $request; private $userManager; diff --git a/tests/unit/controller/BoardImportApiControllerTest.php b/tests/unit/controller/BoardImportApiControllerTest.php index 20db54ae6..cafa3c9b6 100644 --- a/tests/unit/controller/BoardImportApiControllerTest.php +++ b/tests/unit/controller/BoardImportApiControllerTest.php @@ -30,6 +30,7 @@ class BoardImportApiControllerTest extends \Test\TestCase { private $appName = 'deck'; + private $request; private $userId = 'admin'; /** @var BoardImportApiController */ private $controller; diff --git a/tests/unit/controller/StackApiControllerTest.php b/tests/unit/controller/StackApiControllerTest.php index 11d3438e1..100437b50 100644 --- a/tests/unit/controller/StackApiControllerTest.php +++ b/tests/unit/controller/StackApiControllerTest.php @@ -32,6 +32,7 @@ class StackApiControllerTest extends \Test\TestCase { private $appName = 'deck'; + private $request; private $userId = 'admin'; private $controller; private $boardService;