From 5b94705cf3918dc7986c6043b1fbe776bf22958f Mon Sep 17 00:00:00 2001 From: Sean Molenaar Date: Tue, 27 Mar 2018 15:35:06 +0200 Subject: Core: Fix compatibility with nextcloud codestyle (#280) --- tests/Unit/Service/ServiceTest.php | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) (limited to 'tests/Unit/Service/ServiceTest.php') diff --git a/tests/Unit/Service/ServiceTest.php b/tests/Unit/Service/ServiceTest.php index 46242434b..668d54903 100644 --- a/tests/Unit/Service/ServiceTest.php +++ b/tests/Unit/Service/ServiceTest.php @@ -5,10 +5,10 @@ * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * - * @author Alessandro Cosentino - * @author Bernhard Posselt - * @copyright Alessandro Cosentino 2012 - * @copyright Bernhard Posselt 2012, 2014 + * @author Alessandro Cosentino + * @author Bernhard Posselt + * @copyright 2012 Alessandro Cosentino + * @copyright 2012-2014 Bernhard Posselt */ namespace OCA\News\Tests\Unit\Service; @@ -20,18 +20,22 @@ use \OCP\AppFramework\Db\MultipleObjectsReturnedException; use \OCA\News\Db\Folder; -class TestService extends Service { - public function __construct($mapper){ +class TestService extends Service +{ + public function __construct($mapper) + { parent::__construct($mapper); } } -class ServiceTest extends \PHPUnit_Framework_TestCase { +class ServiceTest extends \PHPUnit_Framework_TestCase +{ protected $mapper; protected $newsService; - protected function setUp(){ + protected function setUp() + { $this->mapper = $this->getMockBuilder('\OCA\News\Db\ItemMapper') ->disableOriginalConstructor() ->getMock(); @@ -39,7 +43,8 @@ class ServiceTest extends \PHPUnit_Framework_TestCase { } - public function testDelete(){ + public function testDelete() + { $id = 5; $user = 'ken'; $folder = new Folder(); @@ -57,7 +62,8 @@ class ServiceTest extends \PHPUnit_Framework_TestCase { } - public function testFind(){ + public function testFind() + { $id = 3; $user = 'ken'; @@ -69,7 +75,8 @@ class ServiceTest extends \PHPUnit_Framework_TestCase { } - public function testFindDoesNotExist(){ + public function testFindDoesNotExist() + { $ex = new DoesNotExistException('hi'); $this->mapper->expects($this->once()) @@ -83,7 +90,8 @@ class ServiceTest extends \PHPUnit_Framework_TestCase { } - public function testFindMultiple(){ + public function testFindMultiple() + { $ex = new MultipleObjectsReturnedException('hi'); $this->mapper->expects($this->once()) -- cgit v1.2.3