Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Arne Hamann <[email protected]>
  • Loading branch information
tacruc committed Apr 21, 2022
1 parent 6b546a1 commit 906ce13
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ jobs:
uses: skjnldsv/[email protected]
id: versions
with:
fallbackNode: '^12'
fallbackNpm: '^6'
fallbackNode: '^14'
fallbackNpm: '^7'

- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 12.x
- name: npm install
run: npm install
- name: npm ci
run: npm ci
env:
CI: true
5 changes: 3 additions & 2 deletions tests/Unit/Controller/ContactsControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use OCA\Maps\Service\AddressService;
use OCP\Files\IAppData;
use \OCP\IServerContainer;
use \OCP\EventDispatcher\IEventDispatcher;
use \OCA\DAV\CardDAV\CardDavBackend;
use OCA\DAV\CardDAV\ContactsManager;

Expand Down Expand Up @@ -98,7 +99,7 @@ protected function setUp(): void {
->getMock();

$this->addressService = new AddressService(
$c->query(IServerContainer::class)->getConfig(),
$c->query(IServerContainer::class)->getMemCacheFactory(),
$c->query(IServerContainer::class)->getLogger(),
$c->query(IServerContainer::class)->getJobList(),
$this->appData,
Expand All @@ -122,7 +123,7 @@ protected function setUp(): void {
$this->userPrincipalBackend,
$c->getServer()->getUserManager(),
$c->getServer()->getGroupManager(),
$c->getServer()->getEventDispatcher()
$c->query(IServerContainer::class)->query(IEventDispatcher::class)
);

$this->contactsController = new ContactsController(
Expand Down
7 changes: 5 additions & 2 deletions tests/Unit/Controller/PageControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@
namespace OCA\Maps\Controller;

use \OCA\Maps\AppInfo\Application;
use OCP\AppFramework\Http\TemplateResponse;
use \OCP\AppFramework\Http\TemplateResponse;
use \OCP\EventDispatcher\IEventDispatcher;
use \OCP\IServerContainer;


class PageControllerTest extends \PHPUnit\Framework\TestCase {
private $controller;
private $userId = 'john';
private $config;
private $eventDispatcher;
private $app;
private $container;

Expand All @@ -30,12 +32,13 @@ protected function setUp(): void {
$this->container = $this->app->getContainer();
$c = $this->container;
$this->config = $c->query(IServerContainer::class)->getConfig();
$this->eventDispatcher = $c->query(IServerContainer::class)->query(IEventDispatcher::class);

$this->oldGHValue = $this->config->getAppValue('maps', 'graphhopperURL');
$this->config->setAppValue('maps', 'graphhopperURL', 'https://graphhopper.com:8080');

$this->controller = new PageController(
'maps', $request, $this->config, $initialStateService, $this->userId
'maps', $request, $this->eventDispatcher, $this->config, $initialStateService, $this->userId
);
}

Expand Down

0 comments on commit 906ce13

Please sign in to comment.