summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/unit/utility/SimplePieAPIFactoryTest.php34
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/unit/utility/SimplePieAPIFactoryTest.php b/tests/unit/utility/SimplePieAPIFactoryTest.php
new file mode 100644
index 000000000..a7e7472a0
--- /dev/null
+++ b/tests/unit/utility/SimplePieAPIFactoryTest.php
@@ -0,0 +1,34 @@
+<?php
+/**
+ * ownCloud - News
+ *
+ * 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
+ */
+
+namespace OCA\News\Utility;
+
+
+class SimplePieAPIFactoryTest extends \PHPUnit_Framework_TestCase {
+
+
+ public function testGetFile() {
+ $factory = new SimplePieAPIFactory();
+ $file = $factory->getFile('php://input', 10, 5, $headers='headers',
+ $useragent='flashce', $force_fsockopen=true);
+ $this->assertTrue($file instanceof \SimplePie_File);
+ }
+
+
+ public function testGetCore() {
+ $factory = new SimplePieAPIFactory();
+ $this->assertTrue($factory->getCore() instanceof \SimplePie);
+ }
+
+
+} \ No newline at end of file