summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-10-08 23:09:00 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-10-08 23:09:00 +0200
commitd9920cc529720f39ed152b06470c44bdfa3ca755 (patch)
tree4f358401841de85a1f1f36b82faf89e76c34c5b0
parent24b0e711d6c04736d6c140face5f3db176a4f0c7 (diff)
add test for simplepie api factory
-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