summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bl/feedbl.php32
-rw-r--r--bl/folderbl.php3
-rw-r--r--bl/itembl.php22
-rw-r--r--controller/exportcontroller.php5
-rw-r--r--controller/feedcontroller.php41
-rw-r--r--controller/itemcontroller.php31
-rw-r--r--controller/usersettingscontroller.php22
-rw-r--r--tests/bl/FeedBlTest.php13
-rw-r--r--tests/bl/FolderBlTest.php8
9 files changed, 154 insertions, 23 deletions
diff --git a/bl/feedbl.php b/bl/feedbl.php
index 14182814e..d196586bb 100644
--- a/bl/feedbl.php
+++ b/bl/feedbl.php
@@ -26,13 +26,43 @@
namespace OCA\News\Bl;
use \OCA\News\Db\Feed;
+use \OCA\News\Db\FeedMapper;
class FeedBl extends Bl {
- public function __construct($feedMapper){
+ public function __construct(FeedMapper $feedMapper){
parent::__construct($feedMapper);
}
+ // README: only call this for the cronjob!
+ public function findAll(){
+
+ }
+
+
+ public function findAllFromUser(){
+
+ }
+
+
+ public function create(){
+
+ }
+
+
+ public function update(){
+
+ }
+
+
+ public function move(){
+
+ }
+
+
+ public function read(){
+
+ }
}
diff --git a/bl/folderbl.php b/bl/folderbl.php
index fa12380e3..9d3a7e98d 100644
--- a/bl/folderbl.php
+++ b/bl/folderbl.php
@@ -26,11 +26,12 @@
namespace OCA\News\Bl;
use \OCA\News\Db\Folder;
+use \OCA\News\Db\FolderMapper;
class FolderBl extends Bl {
- public function __construct($folderMapper){
+ public function __construct(FolderMapper $folderMapper){
parent::__construct($folderMapper);
}
diff --git a/bl/itembl.php b/bl/itembl.php
index 5f02f69ad..7dee2318f 100644
--- a/bl/itembl.php
+++ b/bl/itembl.php
@@ -26,13 +26,33 @@
namespace OCA\News\Bl;
use \OCA\News\Db\Item;
+use \OCA\News\Db\ItemMapper;
class ItemBl extends Bl {
- public function __construct($itemMapper){
+ public function __construct(ItemMapper $itemMapper){
parent::__construct($itemMapper);
}
+ public function findAll(){
+
+ }
+
+
+ public function finStarred(){
+
+ }
+
+
+ public function star(){
+
+ }
+
+
+ public function read(){
+
+ }
+
}
diff --git a/controller/exportcontroller.php b/controller/exportcontroller.php
index 6c6d8a71c..d1e6f017d 100644
--- a/controller/exportcontroller.php
+++ b/controller/exportcontroller.php
@@ -38,4 +38,9 @@ class ExportController extends Controller {
}
+ public function opml(){
+
+ }
+
+
} \ No newline at end of file
diff --git a/controller/feedcontroller.php b/controller/feedcontroller.php
index 85de04665..70f110a4a 100644
--- a/controller/feedcontroller.php
+++ b/controller/feedcontroller.php
@@ -31,13 +31,50 @@ use \OCA\AppFramework\Http\Request;
use \OCA\AppFramework\Db\DoesNotExistException;
use \OCA\AppFramework\Db\MultipleObjectsReturnedException;
+use \OCA\Bl\FeedBl;
+
class FeedController extends Controller {
+ private $feedBl;
- public function __construct(API $api, Request $request, $feedMapper){
+ public function __construct(API $api, Request $request, FeedBl $feedBl){
parent::__construct($api, $request);
- $this->feedMapper = $feedMapper;
+ $this->feedBl = $feedBl;
+ }
+
+
+ public function feeds(){
+
+ }
+
+
+ public function active(){
+
+ }
+
+
+ public function create(){
+
}
+
+ public function delete(){
+
+ }
+
+
+ public function update(){
+
+ }
+
+
+ public function move(){
+
+ }
+
+
+ public function read(){
+
+ }
} \ No newline at end of file
diff --git a/controller/itemcontroller.php b/controller/itemcontroller.php
index 81e3dd972..11dd84ecc 100644
--- a/controller/itemcontroller.php
+++ b/controller/itemcontroller.php
@@ -38,9 +38,38 @@ class ItemController extends Controller {
public function __construct(API $api, Request $request, ItemBl $itemBl){
parent::__construct($api, $request);
- $this->itemBl = $itemBl
+ $this->itemBl = $itemBl;
}
+ public function items(){
+
+ }
+
+
+ public function starred(){
+
+ }
+
+
+ public function star(){
+
+ }
+
+
+ public function unstar(){
+
+ }
+
+
+ public function read(){
+
+ }
+
+
+ public function unread(){
+
+ }
+
} \ No newline at end of file
diff --git a/controller/usersettingscontroller.php b/controller/usersettingscontroller.php
index fd77a394f..f912487a7 100644
--- a/controller/usersettingscontroller.php
+++ b/controller/usersettingscontroller.php
@@ -29,18 +29,28 @@ use \OCA\AppFramework\Controller\Controller;
use \OCA\AppFramework\Core\API;
use \OCA\AppFramework\Http\Request;
-use \OCA\News\Bl\FeedBl;
+class UserSettingsController extends Controller {
-class FeedController extends Controller {
- private $feedBl;
-
- public function __construct(API $api, Request $request, FeedBl $feedBl){
+ public function __construct(API $api, Request $request){
parent::__construct($api, $request);
- $this->feedBl = $feedBl
}
+ public function read(){
+
+ }
+
+
+ public function show(){
+
+ }
+
+
+ public function hide(){
+
+ }
+
} \ No newline at end of file
diff --git a/tests/bl/FeedBlTest.php b/tests/bl/FeedBlTest.php
index e67c7ab81..08f98beab 100644
--- a/tests/bl/FeedBlTest.php
+++ b/tests/bl/FeedBlTest.php
@@ -35,20 +35,19 @@ class FeedBlTest extends \OCA\AppFramework\Utility\TestUtility {
protected $api;
protected $feedMapper;
- protected $folderBl;
+ protected $feedBl;
protected function setUp(){
$this->api = $this->getAPIMock();
- $this->feedMapper = $this->getMock(
- '\OCA\News\Db\NewsMapper',
- array('findAllFromUser', 'insert', 'update', 'find'),
- array($this->api, 'test'));
- $this->folderBl = new FolderBl($this->feedMapper);
+ $this->feedMapper = $this->getMockBuilder('\OCA\News\Db\FeedMapper')
+ ->disableOriginalConstructor()
+ ->getMock();
+ $this->feedBl = new FeedBl($this->feedMapper);
}
public function testFindAll(){
-
+
}
} \ No newline at end of file
diff --git a/tests/bl/FolderBlTest.php b/tests/bl/FolderBlTest.php
index dca99c682..de8ba9604 100644
--- a/tests/bl/FolderBlTest.php
+++ b/tests/bl/FolderBlTest.php
@@ -39,10 +39,10 @@ class FolderBlTest extends \OCA\AppFramework\Utility\TestUtility {
protected function setUp(){
$this->api = $this->getAPIMock();
- $this->folderMapper = $this->getMock(
- '\OCA\News\Db\NewsMapper',
- array('findAllFromUser', 'insert', 'update', 'find'),
- array($this->api, 'test'));
+ $this->folderMapper = $this->getMockBuilder(
+ '\OCA\News\Db\FolderMapper')
+ ->disableOriginalConstructor()
+ ->getMock();
$this->folderBl = new FolderBl($this->folderMapper);
}