diff options
author | Sean Molenaar <SMillerDev@users.noreply.github.com> | 2018-03-27 15:35:06 +0200 |
---|---|---|
committer | Bernhard Posselt <BernhardPosselt@users.noreply.github.com> | 2018-03-27 15:35:06 +0200 |
commit | 5b94705cf3918dc7986c6043b1fbe776bf22958f (patch) | |
tree | 4e8059818a0a913d24938e35238913a721fa6373 /tests/Unit/Service/ServiceTest.php | |
parent | f3c9d13551cef5968baea99c2f25085baee0ed5f (diff) |
Core: Fix compatibility with nextcloud codestyle (#280)
Diffstat (limited to 'tests/Unit/Service/ServiceTest.php')
-rw-r--r-- | tests/Unit/Service/ServiceTest.php | 32 |
1 files changed, 20 insertions, 12 deletions
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 <cosenal@gmail.com> - * @author Bernhard Posselt <dev@bernhard-posselt.com> - * @copyright Alessandro Cosentino 2012 - * @copyright Bernhard Posselt 2012, 2014 + * @author Alessandro Cosentino <cosenal@gmail.com> + * @author Bernhard Posselt <dev@bernhard-posselt.com> + * @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()) |