From d9920cc529720f39ed152b06470c44bdfa3ca755 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Wed, 8 Oct 2014 23:09:00 +0200 Subject: add test for simplepie api factory --- tests/unit/utility/SimplePieAPIFactoryTest.php | 34 ++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 tests/unit/utility/SimplePieAPIFactoryTest.php 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 @@ + + * @author Bernhard Posselt + * @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 -- cgit v1.2.3