summaryrefslogtreecommitdiffstats
path: root/tests/Unit/Service/ServiceTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Unit/Service/ServiceTest.php')
-rw-r--r--tests/Unit/Service/ServiceTest.php32
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())