summaryrefslogtreecommitdiffstats
path: root/templates/test.php
diff options
context:
space:
mode:
Diffstat (limited to 'templates/test.php')
-rw-r--r--templates/test.php19
1 files changed, 5 insertions, 14 deletions
diff --git a/templates/test.php b/templates/test.php
index 6796a8cdc..35a1019ed 100644
--- a/templates/test.php
+++ b/templates/test.php
@@ -1,18 +1,9 @@
<?php
-$content = file_get_contents('/tmp/occOrigzvXqKO');
+$itemmapper = new OCA\News\ItemMapper();
-require_once('news/opmlparser.php');
+$items = $itemmapper->findAllStatus(155, OCA\News\StatusFlag::Unread);
-$parser = new OPMLParser($content);
-$title = $parser->getTitle();
-$data = $parser->parse();
-
-foreach ($data as $collection) {
- if ($collection instanceof OCA\News\Feed) {
- echo $collection->getTitle() . '\n';
- } else {
- echo 'NO\n';
- }
-}
-echo $title;
+foreach ($items as $item) {
+ echo $item->getTitle();
+} \ No newline at end of file