From 9cfb561c1c91fc83e588d4e42f1369120bd07c75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Sun, 6 Aug 2017 14:25:10 +0200 Subject: [PATCH] Fix tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- .drone.yml | 2 +- tests/unit/controller/BoardControllerTest.php | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index f8f53e39f..224234f91 100644 --- a/.drone.yml +++ b/.drone.yml @@ -46,7 +46,7 @@ pipeline: - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB - cd ../server - composer install - - ./lib/composer/bin/parallel-lint --exclude lib/composer/jakub-onderka/ --exclude 3rdparty/symfony/polyfill-php70/Resources/stubs/ --exclude 3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/ --exclude 3rdparty/paragonie/random_compat/lib/ --exclude lib/composer/composer/autoload_static.php --exclude 3rdparty/composer/autoload_static.php . + - ./lib/composer/bin/parallel-lint --exclude build/.phan/ --exclude lib/composer/jakub-onderka/ --exclude 3rdparty/symfony/polyfill-php70/Resources/stubs/ --exclude 3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/ --exclude 3rdparty/paragonie/random_compat/lib/ --exclude lib/composer/composer/autoload_static.php --exclude 3rdparty/composer/autoload_static.php . when: matrix: TESTS: syntax-php5.6 diff --git a/tests/unit/controller/BoardControllerTest.php b/tests/unit/controller/BoardControllerTest.php index d26e9288c..9973c7410 100644 --- a/tests/unit/controller/BoardControllerTest.php +++ b/tests/unit/controller/BoardControllerTest.php @@ -24,6 +24,7 @@ namespace OCA\Deck\Controller; use OCA\Deck\Db\Acl; +use OCP\IUser; class BoardControllerTest extends \PHPUnit_Framework_TestCase { @@ -61,11 +62,12 @@ class BoardControllerTest extends \PHPUnit_Framework_TestCase { ->disableOriginalConstructor() ->getMock(); + $user = $this->createMock(IUser::class); $this->groupManager->method('getUserGroupIds') ->willReturn(['admin', 'group1', 'group2']); $this->userManager->method('get') ->with($this->userId) - ->willReturn('user'); + ->willReturn($user); $this->controller = new BoardController( 'deck',