Skip to content

Commit

Permalink
fix tests and php stan
Browse files Browse the repository at this point in the history
Signed-off-by: Swikriti Tripathi <swikriti808@gmail.com>
  • Loading branch information
SwikritiT committed Oct 30, 2023
1 parent 6562bd3 commit 1a286b5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
15 changes: 0 additions & 15 deletions lib/Service/OpenProjectAPIService.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
use OCP\ICache;
use OCP\ICacheFactory;
use OCP\IGroupManager;
use OCP\IDBConnection;
use OCP\IL10N;
use OCP\IURLGenerator;
use OCP\IUserManager;
Expand All @@ -44,7 +43,6 @@
use GuzzleHttp\Exception\ServerException;
use GuzzleHttp\Exception\ConnectException;
use OCP\AppFramework\Http;
use OCP\Files\IMimeTypeLoader;
use OC\Authentication\Events\AppPasswordCreatedEvent;
use OC\Authentication\Token\IProvider;
use OCP\EventDispatcher\IEventDispatcher;
Expand Down Expand Up @@ -114,15 +112,6 @@ class OpenProjectAPIService {
*/
private ISubAdmin $subAdminManager;

/**
* @var IDBConnection
*/
private $dbConnection;

/**
* @var IMimeTypeLoader
*/
private $mimeTypeLoader;
/**
* Service to make requests to OpenProject v3 (JSON) API
*/
Expand All @@ -144,12 +133,10 @@ public function __construct(
IUserManager $userManager,
IGroupManager $groupManager,
IAppManager $appManager,
IDBConnection $dbConnection,
IProvider $tokenProvider,
ISecureRandom $random,
IEventDispatcher $eventDispatcher,
ISubAdmin $subAdminManager,
IMimeTypeLoader $mimeTypeLoader
) {
$this->appName = $appName;
$this->avatarManager = $avatarManager;
Expand All @@ -163,9 +150,7 @@ public function __construct(
$this->userManager = $userManager;
$this->groupManager = $groupManager;
$this->appManager = $appManager;
$this->dbConnection = $dbConnection;
$this->subAdminManager = $subAdminManager;
$this->mimeTypeLoader = $mimeTypeLoader;
$this->tokenProvider = $tokenProvider;
$this->random = $random;
$this->eventDispatcher = $eventDispatcher;
Expand Down
6 changes: 1 addition & 5 deletions tests/lib/Service/OpenProjectAPIServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -462,12 +462,10 @@ private function getOpenProjectAPIService(
$this->createMock(IUserManager::class),
$this->createMock(IGroupManager::class),
$this->createMock(IAppManager::class),
$this->createMock(IDBConnection::class),
$this->createMock(IProvider::class),
$this->createMock(ISecureRandom::class),
$this->createMock(IEventDispatcher::class),
$this->createMock(ISubAdmin::class),
$this->createMock(IMimeTypeLoader::class)
$this->createMock(ISubAdmin::class)
);
}

Expand Down Expand Up @@ -539,12 +537,10 @@ private function getServiceMock(
$userManagerMock,
$groupManagerMock,
$appManagerMock,
$this->createMock(IDBConnection::class),
$tokenProviderMock,
$iSecureRandomMock,
$this->createMock(IEventDispatcher::class),
$subAdminManagerMock,
$this->createMock(IMimeTypeLoader::class)
])
->onlyMethods($onlyMethods)
->getMock();
Expand Down

0 comments on commit 1a286b5

Please sign in to comment.