Bump phpunit and fix CI

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2019-12-17 11:54:45 +01:00
parent f575202a8a
commit 4c0512f0b7
42 changed files with 159 additions and 209 deletions

View File

@@ -30,7 +30,7 @@ use OCA\Deck\Db\Card;
use OCA\Deck\Service\CardService;
class CardApiControllerTest extends \Test\TestCase {
private $controller;
private $request;
private $cardService;
@@ -38,26 +38,26 @@ class CardApiControllerTest extends \Test\TestCase {
private $cardExample;
private $stackExample;
public function setUp() {
public function setUp(): void {
parent::setUp();
$this->request = $this->createMock(IRequest::class);
$this->cardService = $this->createMock(CardService::class);
$this->cardExample['id'] = 1;
$this->stackExample['id'] = 1;
$this->controller = new CardApiController (
$appName = 'deck',
$this->request,
$this->cardService,
$this->cardService,
$this->userId
);
}
public function testGet() {
$card = new Card();
$card->setId($this->cardExample['id']);
$card->setId($this->cardExample['id']);
$this->request->expects($this->once())
->method('getParam')
@@ -104,7 +104,7 @@ class CardApiControllerTest extends \Test\TestCase {
['cardId'],
['stackId']
)->willReturnonConsecutiveCalls(
$this->cardExample['id'],
$this->cardExample['id'],
$this->stackExample['id']);
$this->cardService->expects($this->once())
@@ -120,7 +120,7 @@ class CardApiControllerTest extends \Test\TestCase {
$card = new Card();
$card->setId($this->cardExample['id']);
$this->request->expects($this->once())
->method('getParam')
->with('cardId')
@@ -135,4 +135,4 @@ class CardApiControllerTest extends \Test\TestCase {
$this->assertEquals($expected, $actual);
}
}
}