RssTest.php 73 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202
  1. <?php
  2. /**
  3. * Zend Framework
  4. *
  5. * LICENSE
  6. *
  7. * This source file is subject to the new BSD license that is bundled
  8. * with this package in the file LICENSE.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://framework.zend.com/license/new-bsd
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to license@zend.com so we can send you a copy immediately.
  14. *
  15. * @category Zend
  16. * @package Zend_Feed
  17. * @subpackage UnitTests
  18. * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  19. * @license http://framework.zend.com/license/new-bsd New BSD License
  20. * @version $Id$
  21. */
  22. require_once 'PHPUnit/Framework/TestCase.php';
  23. require_once 'Zend/Feed/Reader.php';
  24. /**
  25. * @category Zend
  26. * @package Zend_Feed
  27. * @subpackage UnitTests
  28. * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  29. * @license http://framework.zend.com/license/new-bsd New BSD License
  30. * @group Zend_Feed
  31. * @group Zend_Feed_Reader
  32. */
  33. class Zend_Feed_Reader_Feed_RssTest extends PHPUnit_Framework_TestCase
  34. {
  35. protected $_feedSamplePath = null;
  36. public function setup()
  37. {
  38. if (Zend_Registry::isRegistered('Zend_Locale')) {
  39. $registry = Zend_Registry::getInstance();
  40. unset($registry['Zend_Locale']);
  41. }
  42. $this->_feedSamplePath = dirname(__FILE__) . '/_files/Rss';
  43. }
  44. /**
  45. * Get Title (Unencoded Text)
  46. */
  47. public function testGetsTitleFromRss20()
  48. {
  49. $feed = Zend_Feed_Reader::importString(
  50. file_get_contents($this->_feedSamplePath.'/title/plain/rss20.xml')
  51. );
  52. $this->assertEquals('My Title', $feed->getTitle());
  53. }
  54. public function testGetsTitleFromRss094()
  55. {
  56. $feed = Zend_Feed_Reader::importString(
  57. file_get_contents($this->_feedSamplePath.'/title/plain/rss094.xml')
  58. );
  59. $this->assertEquals('My Title', $feed->getTitle());
  60. }
  61. public function testGetsTitleFromRss093()
  62. {
  63. $feed = Zend_Feed_Reader::importString(
  64. file_get_contents($this->_feedSamplePath.'/title/plain/rss093.xml')
  65. );
  66. $this->assertEquals('My Title', $feed->getTitle());
  67. }
  68. public function testGetsTitleFromRss092()
  69. {
  70. $feed = Zend_Feed_Reader::importString(
  71. file_get_contents($this->_feedSamplePath.'/title/plain/rss092.xml')
  72. );
  73. $this->assertEquals('My Title', $feed->getTitle());
  74. }
  75. public function testGetsTitleFromRss091()
  76. {
  77. $feed = Zend_Feed_Reader::importString(
  78. file_get_contents($this->_feedSamplePath.'/title/plain/rss091.xml')
  79. );
  80. $this->assertEquals('My Title', $feed->getTitle());
  81. }
  82. public function testGetsTitleFromRss10()
  83. {
  84. $feed = Zend_Feed_Reader::importString(
  85. file_get_contents($this->_feedSamplePath.'/title/plain/rss10.xml')
  86. );
  87. $this->assertEquals('My Title', $feed->getTitle());
  88. }
  89. public function testGetsTitleFromRss090()
  90. {
  91. $feed = Zend_Feed_Reader::importString(
  92. file_get_contents($this->_feedSamplePath.'/title/plain/rss090.xml')
  93. );
  94. $this->assertEquals('My Title', $feed->getTitle());
  95. }
  96. // DC 1.0
  97. public function testGetsTitleFromRss20_Dc10()
  98. {
  99. $feed = Zend_Feed_Reader::importString(
  100. file_get_contents($this->_feedSamplePath.'/title/plain/dc10/rss20.xml')
  101. );
  102. $this->assertEquals('My Title', $feed->getTitle());
  103. }
  104. public function testGetsTitleFromRss094_Dc10()
  105. {
  106. $feed = Zend_Feed_Reader::importString(
  107. file_get_contents($this->_feedSamplePath.'/title/plain/dc10/rss094.xml')
  108. );
  109. $this->assertEquals('My Title', $feed->getTitle());
  110. }
  111. public function testGetsTitleFromRss093_Dc10()
  112. {
  113. $feed = Zend_Feed_Reader::importString(
  114. file_get_contents($this->_feedSamplePath.'/title/plain/dc10/rss093.xml')
  115. );
  116. $this->assertEquals('My Title', $feed->getTitle());
  117. }
  118. public function testGetsTitleFromRss092_Dc10()
  119. {
  120. $feed = Zend_Feed_Reader::importString(
  121. file_get_contents($this->_feedSamplePath.'/title/plain/dc10/rss092.xml')
  122. );
  123. $this->assertEquals('My Title', $feed->getTitle());
  124. }
  125. public function testGetsTitleFromRss091_Dc10()
  126. {
  127. $feed = Zend_Feed_Reader::importString(
  128. file_get_contents($this->_feedSamplePath.'/title/plain/dc10/rss091.xml')
  129. );
  130. $this->assertEquals('My Title', $feed->getTitle());
  131. }
  132. public function testGetsTitleFromRss10_Dc10()
  133. {
  134. $feed = Zend_Feed_Reader::importString(
  135. file_get_contents($this->_feedSamplePath.'/title/plain/dc10/rss10.xml')
  136. );
  137. $this->assertEquals('My Title', $feed->getTitle());
  138. }
  139. public function testGetsTitleFromRss090_Dc10()
  140. {
  141. $feed = Zend_Feed_Reader::importString(
  142. file_get_contents($this->_feedSamplePath.'/title/plain/dc10/rss090.xml')
  143. );
  144. $this->assertEquals('My Title', $feed->getTitle());
  145. }
  146. // DC 1.1
  147. public function testGetsTitleFromRss20_Dc11()
  148. {
  149. $feed = Zend_Feed_Reader::importString(
  150. file_get_contents($this->_feedSamplePath.'/title/plain/dc11/rss20.xml')
  151. );
  152. $this->assertEquals('My Title', $feed->getTitle());
  153. }
  154. public function testGetsTitleFromRss094_Dc11()
  155. {
  156. $feed = Zend_Feed_Reader::importString(
  157. file_get_contents($this->_feedSamplePath.'/title/plain/dc11/rss094.xml')
  158. );
  159. $this->assertEquals('My Title', $feed->getTitle());
  160. }
  161. public function testGetsTitleFromRss093_Dc11()
  162. {
  163. $feed = Zend_Feed_Reader::importString(
  164. file_get_contents($this->_feedSamplePath.'/title/plain/dc11/rss093.xml')
  165. );
  166. $this->assertEquals('My Title', $feed->getTitle());
  167. }
  168. public function testGetsTitleFromRss092_Dc11()
  169. {
  170. $feed = Zend_Feed_Reader::importString(
  171. file_get_contents($this->_feedSamplePath.'/title/plain/dc11/rss092.xml')
  172. );
  173. $this->assertEquals('My Title', $feed->getTitle());
  174. }
  175. public function testGetsTitleFromRss091_Dc11()
  176. {
  177. $feed = Zend_Feed_Reader::importString(
  178. file_get_contents($this->_feedSamplePath.'/title/plain/dc11/rss091.xml')
  179. );
  180. $this->assertEquals('My Title', $feed->getTitle());
  181. }
  182. public function testGetsTitleFromRss10_Dc11()
  183. {
  184. $feed = Zend_Feed_Reader::importString(
  185. file_get_contents($this->_feedSamplePath.'/title/plain/dc11/rss10.xml')
  186. );
  187. $this->assertEquals('My Title', $feed->getTitle());
  188. }
  189. public function testGetsTitleFromRss090_Dc11()
  190. {
  191. $feed = Zend_Feed_Reader::importString(
  192. file_get_contents($this->_feedSamplePath.'/title/plain/dc11/rss090.xml')
  193. );
  194. $this->assertEquals('My Title', $feed->getTitle());
  195. }
  196. // Atom 1.0
  197. public function testGetsTitleFromRss20_atom10()
  198. {
  199. $feed = Zend_Feed_Reader::importString(
  200. file_get_contents($this->_feedSamplePath.'/title/plain/atom10/rss20.xml')
  201. );
  202. $this->assertEquals('My Title', $feed->getTitle());
  203. }
  204. public function testGetsTitleFromRss094_atom10()
  205. {
  206. $feed = Zend_Feed_Reader::importString(
  207. file_get_contents($this->_feedSamplePath.'/title/plain/atom10/rss094.xml')
  208. );
  209. $this->assertEquals('My Title', $feed->getTitle());
  210. }
  211. public function testGetsTitleFromRss093_atom10()
  212. {
  213. $feed = Zend_Feed_Reader::importString(
  214. file_get_contents($this->_feedSamplePath.'/title/plain/atom10/rss093.xml')
  215. );
  216. $this->assertEquals('My Title', $feed->getTitle());
  217. }
  218. public function testGetsTitleFromRss092_atom10()
  219. {
  220. $feed = Zend_Feed_Reader::importString(
  221. file_get_contents($this->_feedSamplePath.'/title/plain/atom10/rss092.xml')
  222. );
  223. $this->assertEquals('My Title', $feed->getTitle());
  224. }
  225. public function testGetsTitleFromRss091_atom10()
  226. {
  227. $feed = Zend_Feed_Reader::importString(
  228. file_get_contents($this->_feedSamplePath.'/title/plain/atom10/rss091.xml')
  229. );
  230. $this->assertEquals('My Title', $feed->getTitle());
  231. }
  232. public function testGetsTitleFromRss10_atom10()
  233. {
  234. $feed = Zend_Feed_Reader::importString(
  235. file_get_contents($this->_feedSamplePath.'/title/plain/atom10/rss10.xml')
  236. );
  237. $this->assertEquals('My Title', $feed->getTitle());
  238. }
  239. public function testGetsTitleFromRss090_atom10()
  240. {
  241. $feed = Zend_Feed_Reader::importString(
  242. file_get_contents($this->_feedSamplePath.'/title/plain/atom10/rss090.xml')
  243. );
  244. $this->assertEquals('My Title', $feed->getTitle());
  245. }
  246. // Missing Title
  247. public function testGetsTitleFromRss20_None()
  248. {
  249. $feed = Zend_Feed_Reader::importString(
  250. file_get_contents($this->_feedSamplePath.'/title/plain/none/rss20.xml')
  251. );
  252. $this->assertEquals(null, $feed->getTitle());
  253. }
  254. public function testGetsTitleFromRss094_None()
  255. {
  256. $feed = Zend_Feed_Reader::importString(
  257. file_get_contents($this->_feedSamplePath.'/title/plain/none/rss094.xml')
  258. );
  259. $this->assertEquals(null, $feed->getTitle());
  260. }
  261. public function testGetsTitleFromRss093_None()
  262. {
  263. $feed = Zend_Feed_Reader::importString(
  264. file_get_contents($this->_feedSamplePath.'/title/plain/none/rss093.xml')
  265. );
  266. $this->assertEquals(null, $feed->getTitle());
  267. }
  268. public function testGetsTitleFromRss092_None()
  269. {
  270. $feed = Zend_Feed_Reader::importString(
  271. file_get_contents($this->_feedSamplePath.'/title/plain/none/rss092.xml')
  272. );
  273. $this->assertEquals(null, $feed->getTitle());
  274. }
  275. public function testGetsTitleFromRss091_None()
  276. {
  277. $feed = Zend_Feed_Reader::importString(
  278. file_get_contents($this->_feedSamplePath.'/title/plain/none/rss091.xml')
  279. );
  280. $this->assertEquals(null, $feed->getTitle());
  281. }
  282. public function testGetsTitleFromRss10_None()
  283. {
  284. $feed = Zend_Feed_Reader::importString(
  285. file_get_contents($this->_feedSamplePath.'/title/plain/none/rss10.xml')
  286. );
  287. $this->assertEquals(null, $feed->getTitle());
  288. }
  289. public function testGetsTitleFromRss090_None()
  290. {
  291. $feed = Zend_Feed_Reader::importString(
  292. file_get_contents($this->_feedSamplePath.'/title/plain/none/rss090.xml')
  293. );
  294. $this->assertEquals(null, $feed->getTitle());
  295. }
  296. /**
  297. * Get Authors (Unencoded Text)
  298. */
  299. public function testGetsAuthorArrayFromRss20()
  300. {
  301. $feed = Zend_Feed_Reader::importString(
  302. file_get_contents($this->_feedSamplePath.'/author/plain/rss20.xml')
  303. );
  304. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors());
  305. }
  306. public function testGetsAuthorArrayFromRss094()
  307. {
  308. $feed = Zend_Feed_Reader::importString(
  309. file_get_contents($this->_feedSamplePath.'/author/plain/rss094.xml')
  310. );
  311. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors());
  312. }
  313. public function testGetsAuthorArrayFromRss093()
  314. {
  315. $feed = Zend_Feed_Reader::importString(
  316. file_get_contents($this->_feedSamplePath.'/author/plain/rss093.xml')
  317. );
  318. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors());
  319. }
  320. public function testGetsAuthorArrayFromRss092()
  321. {
  322. $feed = Zend_Feed_Reader::importString(
  323. file_get_contents($this->_feedSamplePath.'/author/plain/rss092.xml')
  324. );
  325. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors());
  326. }
  327. public function testGetsAuthorArrayFromRss091()
  328. {
  329. $feed = Zend_Feed_Reader::importString(
  330. file_get_contents($this->_feedSamplePath.'/author/plain/rss091.xml')
  331. );
  332. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors());
  333. }
  334. public function testGetsAuthorArrayFromRss10()
  335. {
  336. $feed = Zend_Feed_Reader::importString(
  337. file_get_contents($this->_feedSamplePath.'/author/plain/rss10.xml')
  338. );
  339. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors());
  340. }
  341. public function testGetsAuthorArrayFromRss090()
  342. {
  343. $feed = Zend_Feed_Reader::importString(
  344. file_get_contents($this->_feedSamplePath.'/author/plain/rss090.xml')
  345. );
  346. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors());
  347. }
  348. // DC 1.0
  349. public function testGetsAuthorArrayFromRss20_Dc10()
  350. {
  351. $feed = Zend_Feed_Reader::importString(
  352. file_get_contents($this->_feedSamplePath.'/author/plain/dc10/rss20.xml')
  353. );
  354. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors());
  355. }
  356. public function testGetsAuthorArrayFromRss094_Dc10()
  357. {
  358. $feed = Zend_Feed_Reader::importString(
  359. file_get_contents($this->_feedSamplePath.'/author/plain/dc10/rss094.xml')
  360. );
  361. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors());
  362. }
  363. public function testGetsAuthorArrayFromRss093_Dc10()
  364. {
  365. $feed = Zend_Feed_Reader::importString(
  366. file_get_contents($this->_feedSamplePath.'/author/plain/dc10/rss093.xml')
  367. );
  368. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors());
  369. }
  370. public function testGetsAuthorArrayFromRss092_Dc10()
  371. {
  372. $feed = Zend_Feed_Reader::importString(
  373. file_get_contents($this->_feedSamplePath.'/author/plain/dc10/rss092.xml')
  374. );
  375. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors());
  376. }
  377. public function testGetsAuthorArrayFromRss091_Dc10()
  378. {
  379. $feed = Zend_Feed_Reader::importString(
  380. file_get_contents($this->_feedSamplePath.'/author/plain/dc10/rss091.xml')
  381. );
  382. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors());
  383. }
  384. public function testGetsAuthorArrayFromRss10_Dc10()
  385. {
  386. $feed = Zend_Feed_Reader::importString(
  387. file_get_contents($this->_feedSamplePath.'/author/plain/dc10/rss10.xml')
  388. );
  389. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors());
  390. }
  391. public function testGetsAuthorArrayFromRss090_Dc10()
  392. {
  393. $feed = Zend_Feed_Reader::importString(
  394. file_get_contents($this->_feedSamplePath.'/author/plain/dc10/rss090.xml')
  395. );
  396. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors());
  397. }
  398. // DC 1.1
  399. public function testGetsAuthorArrayFromRss20_Dc11()
  400. {
  401. $feed = Zend_Feed_Reader::importString(
  402. file_get_contents($this->_feedSamplePath.'/author/plain/dc11/rss20.xml')
  403. );
  404. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors());
  405. }
  406. public function testGetsAuthorArrayFromRss094_Dc11()
  407. {
  408. $feed = Zend_Feed_Reader::importString(
  409. file_get_contents($this->_feedSamplePath.'/author/plain/dc11/rss094.xml')
  410. );
  411. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors());
  412. }
  413. public function testGetsAuthorArrayFromRss093_Dc11()
  414. {
  415. $feed = Zend_Feed_Reader::importString(
  416. file_get_contents($this->_feedSamplePath.'/author/plain/dc11/rss093.xml')
  417. );
  418. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors());
  419. }
  420. public function testGetsAuthorArrayFromRss092_Dc11()
  421. {
  422. $feed = Zend_Feed_Reader::importString(
  423. file_get_contents($this->_feedSamplePath.'/author/plain/dc11/rss092.xml')
  424. );
  425. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors());
  426. }
  427. public function testGetsAuthorArrayFromRss091_Dc11()
  428. {
  429. $feed = Zend_Feed_Reader::importString(
  430. file_get_contents($this->_feedSamplePath.'/author/plain/dc11/rss091.xml')
  431. );
  432. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors());
  433. }
  434. public function testGetsAuthorArrayFromRss10_Dc11()
  435. {
  436. $feed = Zend_Feed_Reader::importString(
  437. file_get_contents($this->_feedSamplePath.'/author/plain/dc11/rss10.xml')
  438. );
  439. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors());
  440. }
  441. public function testGetsAuthorArrayFromRss090_Dc11()
  442. {
  443. $feed = Zend_Feed_Reader::importString(
  444. file_get_contents($this->_feedSamplePath.'/author/plain/dc11/rss090.xml')
  445. );
  446. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors());
  447. }
  448. // Atom 1.0
  449. public function testGetsAuthorArrayFromRss20_Atom10()
  450. {
  451. $feed = Zend_Feed_Reader::importString(
  452. file_get_contents($this->_feedSamplePath.'/author/plain/atom10/rss20.xml')
  453. );
  454. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors());
  455. }
  456. public function testGetsAuthorArrayFromRss094_Atom10()
  457. {
  458. $feed = Zend_Feed_Reader::importString(
  459. file_get_contents($this->_feedSamplePath.'/author/plain/atom10/rss094.xml')
  460. );
  461. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors());
  462. }
  463. public function testGetsAuthorArrayFromRss093_Atom10()
  464. {
  465. $feed = Zend_Feed_Reader::importString(
  466. file_get_contents($this->_feedSamplePath.'/author/plain/atom10/rss093.xml')
  467. );
  468. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors());
  469. }
  470. public function testGetsAuthorArrayFromRss092_Atom10()
  471. {
  472. $feed = Zend_Feed_Reader::importString(
  473. file_get_contents($this->_feedSamplePath.'/author/plain/atom10/rss092.xml')
  474. );
  475. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors());
  476. }
  477. public function testGetsAuthorArrayFromRss091_Atom10()
  478. {
  479. $feed = Zend_Feed_Reader::importString(
  480. file_get_contents($this->_feedSamplePath.'/author/plain/atom10/rss091.xml')
  481. );
  482. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors());
  483. }
  484. public function testGetsAuthorArrayFromRss10_Atom10()
  485. {
  486. $feed = Zend_Feed_Reader::importString(
  487. file_get_contents($this->_feedSamplePath.'/author/plain/atom10/rss10.xml')
  488. );
  489. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors());
  490. }
  491. public function testGetsAuthorArrayFromRss090_Atom10()
  492. {
  493. $feed = Zend_Feed_Reader::importString(
  494. file_get_contents($this->_feedSamplePath.'/author/plain/atom10/rss090.xml')
  495. );
  496. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors());
  497. }
  498. // Missing Authors
  499. public function testGetsAuthorArrayFromRss20_None()
  500. {
  501. $feed = Zend_Feed_Reader::importString(
  502. file_get_contents($this->_feedSamplePath.'/author/plain/none/rss20.xml')
  503. );
  504. $this->assertEquals(null, $feed->getAuthors());
  505. }
  506. public function testGetsAuthorArrayFromRss094_None()
  507. {
  508. $feed = Zend_Feed_Reader::importString(
  509. file_get_contents($this->_feedSamplePath.'/author/plain/none/rss094.xml')
  510. );
  511. $this->assertEquals(null, $feed->getAuthors());
  512. }
  513. public function testGetsAuthorArrayFromRss093_None()
  514. {
  515. $feed = Zend_Feed_Reader::importString(
  516. file_get_contents($this->_feedSamplePath.'/author/plain/none/rss093.xml')
  517. );
  518. $this->assertEquals(null, $feed->getAuthors());
  519. }
  520. public function testGetsAuthorArrayFromRss092_None()
  521. {
  522. $feed = Zend_Feed_Reader::importString(
  523. file_get_contents($this->_feedSamplePath.'/author/plain/none/rss092.xml')
  524. );
  525. $this->assertEquals(null, $feed->getAuthors());
  526. }
  527. public function testGetsAuthorArrayFromRss091_None()
  528. {
  529. $feed = Zend_Feed_Reader::importString(
  530. file_get_contents($this->_feedSamplePath.'/author/plain/none/rss091.xml')
  531. );
  532. $this->assertEquals(null, $feed->getAuthors());
  533. }
  534. public function testGetsAuthorArrayFromRss10_None()
  535. {
  536. $feed = Zend_Feed_Reader::importString(
  537. file_get_contents($this->_feedSamplePath.'/author/plain/none/rss10.xml')
  538. );
  539. $this->assertEquals(null, $feed->getAuthors());
  540. }
  541. public function testGetsAuthorArrayFromRss090_None()
  542. {
  543. $feed = Zend_Feed_Reader::importString(
  544. file_get_contents($this->_feedSamplePath.'/author/plain/none/rss090.xml')
  545. );
  546. $this->assertEquals(null, $feed->getAuthors());
  547. }
  548. /**
  549. * Get Single Author (Unencoded Text)
  550. */
  551. public function testGetsSingleAuthorFromRss20()
  552. {
  553. $feed = Zend_Feed_Reader::importString(
  554. file_get_contents($this->_feedSamplePath.'/author/plain/rss20.xml')
  555. );
  556. $this->assertEquals('Joe Bloggs', $feed->getAuthor());
  557. }
  558. public function testGetsSingleAuthorFromRss094()
  559. {
  560. $feed = Zend_Feed_Reader::importString(
  561. file_get_contents($this->_feedSamplePath.'/author/plain/rss094.xml')
  562. );
  563. $this->assertEquals('Joe Bloggs', $feed->getAuthor());
  564. }
  565. public function testGetsSingleAuthorFromRss093()
  566. {
  567. $feed = Zend_Feed_Reader::importString(
  568. file_get_contents($this->_feedSamplePath.'/author/plain/rss093.xml')
  569. );
  570. $this->assertEquals('Joe Bloggs', $feed->getAuthor());
  571. }
  572. public function testGetsSingleAuthorFromRss092()
  573. {
  574. $feed = Zend_Feed_Reader::importString(
  575. file_get_contents($this->_feedSamplePath.'/author/plain/rss092.xml')
  576. );
  577. $this->assertEquals('Joe Bloggs', $feed->getAuthor());
  578. }
  579. public function testGetsSingleAuthorFromRss091()
  580. {
  581. $feed = Zend_Feed_Reader::importString(
  582. file_get_contents($this->_feedSamplePath.'/author/plain/rss091.xml')
  583. );
  584. $this->assertEquals('Joe Bloggs', $feed->getAuthor());
  585. }
  586. public function testGetsSingleAuthorFromRss10()
  587. {
  588. $feed = Zend_Feed_Reader::importString(
  589. file_get_contents($this->_feedSamplePath.'/author/plain/rss10.xml')
  590. );
  591. $this->assertEquals('Joe Bloggs', $feed->getAuthor());
  592. }
  593. public function testGetsSingleAuthorFromRss090()
  594. {
  595. $feed = Zend_Feed_Reader::importString(
  596. file_get_contents($this->_feedSamplePath.'/author/plain/rss090.xml')
  597. );
  598. $this->assertEquals('Joe Bloggs', $feed->getAuthor());
  599. }
  600. // DC 1.0
  601. public function testGetsSingleAuthorFromRss20_Dc10()
  602. {
  603. $feed = Zend_Feed_Reader::importString(
  604. file_get_contents($this->_feedSamplePath.'/author/plain/dc10/rss20.xml')
  605. );
  606. $this->assertEquals('Joe Bloggs', $feed->getAuthor());
  607. }
  608. public function testGetsSingleAuthorFromRss094_Dc10()
  609. {
  610. $feed = Zend_Feed_Reader::importString(
  611. file_get_contents($this->_feedSamplePath.'/author/plain/dc10/rss094.xml')
  612. );
  613. $this->assertEquals('Joe Bloggs', $feed->getAuthor());
  614. }
  615. public function testGetsSingleAuthorFromRss093_Dc10()
  616. {
  617. $feed = Zend_Feed_Reader::importString(
  618. file_get_contents($this->_feedSamplePath.'/author/plain/dc10/rss093.xml')
  619. );
  620. $this->assertEquals('Joe Bloggs', $feed->getAuthor());
  621. }
  622. public function testGetsSingleAuthorFromRss092_Dc10()
  623. {
  624. $feed = Zend_Feed_Reader::importString(
  625. file_get_contents($this->_feedSamplePath.'/author/plain/dc10/rss092.xml')
  626. );
  627. $this->assertEquals('Joe Bloggs', $feed->getAuthor());
  628. }
  629. public function testGetsSingleAuthorFromRss091_Dc10()
  630. {
  631. $feed = Zend_Feed_Reader::importString(
  632. file_get_contents($this->_feedSamplePath.'/author/plain/dc10/rss091.xml')
  633. );
  634. $this->assertEquals('Joe Bloggs', $feed->getAuthor());
  635. }
  636. public function testGetsSingleAuthorFromRss10_Dc10()
  637. {
  638. $feed = Zend_Feed_Reader::importString(
  639. file_get_contents($this->_feedSamplePath.'/author/plain/dc10/rss10.xml')
  640. );
  641. $this->assertEquals('Joe Bloggs', $feed->getAuthor());
  642. }
  643. public function testGetsSingleAuthorFromRss090_Dc10()
  644. {
  645. $feed = Zend_Feed_Reader::importString(
  646. file_get_contents($this->_feedSamplePath.'/author/plain/dc10/rss090.xml')
  647. );
  648. $this->assertEquals('Joe Bloggs', $feed->getAuthor());
  649. }
  650. // DC 1.1
  651. public function testGetsSingleAuthorFromRss20_Dc11()
  652. {
  653. $feed = Zend_Feed_Reader::importString(
  654. file_get_contents($this->_feedSamplePath.'/author/plain/dc11/rss20.xml')
  655. );
  656. $this->assertEquals('Joe Bloggs', $feed->getAuthor());
  657. }
  658. public function testGetsSingleAuthorFromRss094_Dc11()
  659. {
  660. $feed = Zend_Feed_Reader::importString(
  661. file_get_contents($this->_feedSamplePath.'/author/plain/dc11/rss094.xml')
  662. );
  663. $this->assertEquals('Joe Bloggs', $feed->getAuthor());
  664. }
  665. public function testGetsSingleAuthorFromRss093_Dc11()
  666. {
  667. $feed = Zend_Feed_Reader::importString(
  668. file_get_contents($this->_feedSamplePath.'/author/plain/dc11/rss093.xml')
  669. );
  670. $this->assertEquals('Joe Bloggs', $feed->getAuthor());
  671. }
  672. public function testGetsSingleAuthorFromRss092_Dc11()
  673. {
  674. $feed = Zend_Feed_Reader::importString(
  675. file_get_contents($this->_feedSamplePath.'/author/plain/dc11/rss092.xml')
  676. );
  677. $this->assertEquals('Joe Bloggs', $feed->getAuthor());
  678. }
  679. public function testGetsSingleAuthorFromRss091_Dc11()
  680. {
  681. $feed = Zend_Feed_Reader::importString(
  682. file_get_contents($this->_feedSamplePath.'/author/plain/dc11/rss091.xml')
  683. );
  684. $this->assertEquals('Joe Bloggs', $feed->getAuthor());
  685. }
  686. public function testGetsSingleAuthorFromRss10_Dc11()
  687. {
  688. $feed = Zend_Feed_Reader::importString(
  689. file_get_contents($this->_feedSamplePath.'/author/plain/dc11/rss10.xml')
  690. );
  691. $this->assertEquals('Joe Bloggs', $feed->getAuthor());
  692. }
  693. public function testGetsSingleAuthorFromRss090_Dc11()
  694. {
  695. $feed = Zend_Feed_Reader::importString(
  696. file_get_contents($this->_feedSamplePath.'/author/plain/dc11/rss090.xml')
  697. );
  698. $this->assertEquals('Joe Bloggs', $feed->getAuthor());
  699. }
  700. // Missing Author
  701. public function testGetsSingleAuthorFromRss20_None()
  702. {
  703. $feed = Zend_Feed_Reader::importString(
  704. file_get_contents($this->_feedSamplePath.'/author/plain/none/rss20.xml')
  705. );
  706. $this->assertEquals(null, $feed->getAuthor());
  707. }
  708. public function testGetsSingleAuthorFromRss094_None()
  709. {
  710. $feed = Zend_Feed_Reader::importString(
  711. file_get_contents($this->_feedSamplePath.'/author/plain/none/rss094.xml')
  712. );
  713. $this->assertEquals(null, $feed->getAuthor());
  714. }
  715. public function testGetsSingleAuthorFromRss093_None()
  716. {
  717. $feed = Zend_Feed_Reader::importString(
  718. file_get_contents($this->_feedSamplePath.'/author/plain/none/rss093.xml')
  719. );
  720. $this->assertEquals(null, $feed->getAuthor());
  721. }
  722. public function testGetsSingleAuthorFromRss092_None()
  723. {
  724. $feed = Zend_Feed_Reader::importString(
  725. file_get_contents($this->_feedSamplePath.'/author/plain/none/rss092.xml')
  726. );
  727. $this->assertEquals(null, $feed->getAuthor());
  728. }
  729. public function testGetsSingleAuthorFromRss091_None()
  730. {
  731. $feed = Zend_Feed_Reader::importString(
  732. file_get_contents($this->_feedSamplePath.'/author/plain/none/rss091.xml')
  733. );
  734. $this->assertEquals(null, $feed->getAuthor());
  735. }
  736. public function testGetsSingleAuthorFromRss10_None()
  737. {
  738. $feed = Zend_Feed_Reader::importString(
  739. file_get_contents($this->_feedSamplePath.'/author/plain/none/rss10.xml')
  740. );
  741. $this->assertEquals(null, $feed->getAuthor());
  742. }
  743. public function testGetsSingleAuthorFromRss090_None()
  744. {
  745. $feed = Zend_Feed_Reader::importString(
  746. file_get_contents($this->_feedSamplePath.'/author/plain/none/rss090.xml')
  747. );
  748. $this->assertEquals(null, $feed->getAuthor());
  749. }
  750. /**
  751. * Get Copyright (Unencoded Text)
  752. */
  753. public function testGetsCopyrightFromRss20()
  754. {
  755. $feed = Zend_Feed_Reader::importString(
  756. file_get_contents($this->_feedSamplePath.'/copyright/plain/rss20.xml')
  757. );
  758. $this->assertEquals('Copyright 2008', $feed->getCopyright());
  759. }
  760. public function testGetsCopyrightFromRss094()
  761. {
  762. $feed = Zend_Feed_Reader::importString(
  763. file_get_contents($this->_feedSamplePath.'/copyright/plain/rss094.xml')
  764. );
  765. $this->assertEquals('Copyright 2008', $feed->getCopyright());
  766. }
  767. public function testGetsCopyrightFromRss093()
  768. {
  769. $feed = Zend_Feed_Reader::importString(
  770. file_get_contents($this->_feedSamplePath.'/copyright/plain/rss093.xml')
  771. );
  772. $this->assertEquals('Copyright 2008', $feed->getCopyright());
  773. }
  774. public function testGetsCopyrightFromRss092()
  775. {
  776. $feed = Zend_Feed_Reader::importString(
  777. file_get_contents($this->_feedSamplePath.'/copyright/plain/rss092.xml')
  778. );
  779. $this->assertEquals('Copyright 2008', $feed->getCopyright());
  780. }
  781. public function testGetsCopyrightFromRss091()
  782. {
  783. $feed = Zend_Feed_Reader::importString(
  784. file_get_contents($this->_feedSamplePath.'/copyright/plain/rss091.xml')
  785. );
  786. $this->assertEquals('Copyright 2008', $feed->getCopyright());
  787. }
  788. public function testGetsCopyrightFromRss10()
  789. {
  790. $feed = Zend_Feed_Reader::importString(
  791. file_get_contents($this->_feedSamplePath.'/copyright/plain/rss10.xml')
  792. );
  793. $this->assertEquals(null, $feed->getCopyright());
  794. }
  795. public function testGetsCopyrightFromRss090()
  796. {
  797. $feed = Zend_Feed_Reader::importString(
  798. file_get_contents($this->_feedSamplePath.'/copyright/plain/rss090.xml')
  799. );
  800. $this->assertEquals(null, $feed->getCopyright());
  801. }
  802. // DC 1.0
  803. public function testGetsCopyrightFromRss20_Dc10()
  804. {
  805. $feed = Zend_Feed_Reader::importString(
  806. file_get_contents($this->_feedSamplePath.'/copyright/plain/dc10/rss20.xml')
  807. );
  808. $this->assertEquals('Copyright 2008', $feed->getCopyright());
  809. }
  810. public function testGetsCopyrightFromRss094_Dc10()
  811. {
  812. $feed = Zend_Feed_Reader::importString(
  813. file_get_contents($this->_feedSamplePath.'/copyright/plain/dc10/rss094.xml')
  814. );
  815. $this->assertEquals('Copyright 2008', $feed->getCopyright());
  816. }
  817. public function testGetsCopyrightFromRss093_Dc10()
  818. {
  819. $feed = Zend_Feed_Reader::importString(
  820. file_get_contents($this->_feedSamplePath.'/copyright/plain/dc10/rss093.xml')
  821. );
  822. $this->assertEquals('Copyright 2008', $feed->getCopyright());
  823. }
  824. public function testGetsCopyrightFromRss092_Dc10()
  825. {
  826. $feed = Zend_Feed_Reader::importString(
  827. file_get_contents($this->_feedSamplePath.'/copyright/plain/dc10/rss092.xml')
  828. );
  829. $this->assertEquals('Copyright 2008', $feed->getCopyright());
  830. }
  831. public function testGetsCopyrightFromRss091_Dc10()
  832. {
  833. $feed = Zend_Feed_Reader::importString(
  834. file_get_contents($this->_feedSamplePath.'/copyright/plain/dc10/rss091.xml')
  835. );
  836. $this->assertEquals('Copyright 2008', $feed->getCopyright());
  837. }
  838. public function testGetsCopyrightFromRss10_Dc10()
  839. {
  840. $feed = Zend_Feed_Reader::importString(
  841. file_get_contents($this->_feedSamplePath.'/copyright/plain/dc10/rss10.xml')
  842. );
  843. $this->assertEquals('Copyright 2008', $feed->getCopyright());
  844. }
  845. public function testGetsCopyrightFromRss090_Dc10()
  846. {
  847. $feed = Zend_Feed_Reader::importString(
  848. file_get_contents($this->_feedSamplePath.'/copyright/plain/dc10/rss090.xml')
  849. );
  850. $this->assertEquals('Copyright 2008', $feed->getCopyright());
  851. }
  852. // DC 1.1
  853. public function testGetsCopyrightFromRss20_Dc11()
  854. {
  855. $feed = Zend_Feed_Reader::importString(
  856. file_get_contents($this->_feedSamplePath.'/copyright/plain/dc11/rss20.xml')
  857. );
  858. $this->assertEquals('Copyright 2008', $feed->getCopyright());
  859. }
  860. public function testGetsCopyrightFromRss094_Dc11()
  861. {
  862. $feed = Zend_Feed_Reader::importString(
  863. file_get_contents($this->_feedSamplePath.'/copyright/plain/dc11/rss094.xml')
  864. );
  865. $this->assertEquals('Copyright 2008', $feed->getCopyright());
  866. }
  867. public function testGetsCopyrightFromRss093_Dc11()
  868. {
  869. $feed = Zend_Feed_Reader::importString(
  870. file_get_contents($this->_feedSamplePath.'/copyright/plain/dc11/rss093.xml')
  871. );
  872. $this->assertEquals('Copyright 2008', $feed->getCopyright());
  873. }
  874. public function testGetsCopyrightFromRss092_Dc11()
  875. {
  876. $feed = Zend_Feed_Reader::importString(
  877. file_get_contents($this->_feedSamplePath.'/copyright/plain/dc11/rss092.xml')
  878. );
  879. $this->assertEquals('Copyright 2008', $feed->getCopyright());
  880. }
  881. public function testGetsCopyrightFromRss091_Dc11()
  882. {
  883. $feed = Zend_Feed_Reader::importString(
  884. file_get_contents($this->_feedSamplePath.'/copyright/plain/dc11/rss091.xml')
  885. );
  886. $this->assertEquals('Copyright 2008', $feed->getCopyright());
  887. }
  888. public function testGetsCopyrightFromRss10_Dc11()
  889. {
  890. $feed = Zend_Feed_Reader::importString(
  891. file_get_contents($this->_feedSamplePath.'/copyright/plain/dc11/rss10.xml')
  892. );
  893. $this->assertEquals('Copyright 2008', $feed->getCopyright());
  894. }
  895. public function testGetsCopyrightFromRss090_Dc11()
  896. {
  897. $feed = Zend_Feed_Reader::importString(
  898. file_get_contents($this->_feedSamplePath.'/copyright/plain/dc11/rss090.xml')
  899. );
  900. $this->assertEquals('Copyright 2008', $feed->getCopyright());
  901. }
  902. // Missing Copyright
  903. public function testGetsCopyrightFromRss20_None()
  904. {
  905. $feed = Zend_Feed_Reader::importString(
  906. file_get_contents($this->_feedSamplePath.'/copyright/plain/none/rss20.xml')
  907. );
  908. $this->assertEquals(null, $feed->getCopyright());
  909. }
  910. public function testGetsCopyrightFromRss094_None()
  911. {
  912. $feed = Zend_Feed_Reader::importString(
  913. file_get_contents($this->_feedSamplePath.'/copyright/plain/none/rss094.xml')
  914. );
  915. $this->assertEquals(null, $feed->getCopyright());
  916. }
  917. public function testGetsCopyrightFromRss093_None()
  918. {
  919. $feed = Zend_Feed_Reader::importString(
  920. file_get_contents($this->_feedSamplePath.'/copyright/plain/none/rss093.xml')
  921. );
  922. $this->assertEquals(null, $feed->getCopyright());
  923. }
  924. public function testGetsCopyrightFromRss092_None()
  925. {
  926. $feed = Zend_Feed_Reader::importString(
  927. file_get_contents($this->_feedSamplePath.'/copyright/plain/none/rss092.xml')
  928. );
  929. $this->assertEquals(null, $feed->getCopyright());
  930. }
  931. public function testGetsCopyrightFromRss091_None()
  932. {
  933. $feed = Zend_Feed_Reader::importString(
  934. file_get_contents($this->_feedSamplePath.'/copyright/plain/none/rss091.xml')
  935. );
  936. $this->assertEquals(null, $feed->getCopyright());
  937. }
  938. public function testGetsCopyrightFromRss10_None()
  939. {
  940. $feed = Zend_Feed_Reader::importString(
  941. file_get_contents($this->_feedSamplePath.'/copyright/plain/none/rss10.xml')
  942. );
  943. $this->assertEquals(null, $feed->getCopyright());
  944. }
  945. public function testGetsCopyrightFromRss090_None()
  946. {
  947. $feed = Zend_Feed_Reader::importString(
  948. file_get_contents($this->_feedSamplePath.'/copyright/plain/none/rss090.xml')
  949. );
  950. $this->assertEquals(null, $feed->getCopyright());
  951. }
  952. /**
  953. * Get Description (Unencoded Text)
  954. */
  955. public function testGetsDescriptionFromRss20()
  956. {
  957. $feed = Zend_Feed_Reader::importString(
  958. file_get_contents($this->_feedSamplePath.'/description/plain/rss20.xml')
  959. );
  960. $this->assertEquals('My Description', $feed->getDescription());
  961. }
  962. public function testGetsDescriptionFromRss094()
  963. {
  964. $feed = Zend_Feed_Reader::importString(
  965. file_get_contents($this->_feedSamplePath.'/description/plain/rss094.xml')
  966. );
  967. $this->assertEquals('My Description', $feed->getDescription());
  968. }
  969. public function testGetsDescriptionFromRss093()
  970. {
  971. $feed = Zend_Feed_Reader::importString(
  972. file_get_contents($this->_feedSamplePath.'/description/plain/rss093.xml')
  973. );
  974. $this->assertEquals('My Description', $feed->getDescription());
  975. }
  976. public function testGetsDescriptionFromRss092()
  977. {
  978. $feed = Zend_Feed_Reader::importString(
  979. file_get_contents($this->_feedSamplePath.'/description/plain/rss092.xml')
  980. );
  981. $this->assertEquals('My Description', $feed->getDescription());
  982. }
  983. public function testGetsDescriptionFromRss091()
  984. {
  985. $feed = Zend_Feed_Reader::importString(
  986. file_get_contents($this->_feedSamplePath.'/description/plain/rss091.xml')
  987. );
  988. $this->assertEquals('My Description', $feed->getDescription());
  989. }
  990. public function testGetsDescriptionFromRss10()
  991. {
  992. $feed = Zend_Feed_Reader::importString(
  993. file_get_contents($this->_feedSamplePath.'/description/plain/rss10.xml')
  994. );
  995. $this->assertEquals('My Description', $feed->getDescription());
  996. }
  997. public function testGetsDescriptionFromRss090()
  998. {
  999. $feed = Zend_Feed_Reader::importString(
  1000. file_get_contents($this->_feedSamplePath.'/description/plain/rss090.xml')
  1001. );
  1002. $this->assertEquals('My Description', $feed->getDescription());
  1003. }
  1004. // DC 1.0
  1005. public function testGetsDescriptionFromRss20_Dc10()
  1006. {
  1007. $feed = Zend_Feed_Reader::importString(
  1008. file_get_contents($this->_feedSamplePath.'/description/plain/dc10/rss20.xml')
  1009. );
  1010. $this->assertEquals('My Description', $feed->getDescription());
  1011. }
  1012. public function testGetsDescriptionFromRss094_Dc10()
  1013. {
  1014. $feed = Zend_Feed_Reader::importString(
  1015. file_get_contents($this->_feedSamplePath.'/description/plain/dc10/rss094.xml')
  1016. );
  1017. $this->assertEquals('My Description', $feed->getDescription());
  1018. }
  1019. public function testGetsDescriptionFromRss093_Dc10()
  1020. {
  1021. $feed = Zend_Feed_Reader::importString(
  1022. file_get_contents($this->_feedSamplePath.'/description/plain/dc10/rss093.xml')
  1023. );
  1024. $this->assertEquals('My Description', $feed->getDescription());
  1025. }
  1026. public function testGetsDescriptionFromRss092_Dc10()
  1027. {
  1028. $feed = Zend_Feed_Reader::importString(
  1029. file_get_contents($this->_feedSamplePath.'/description/plain/dc10/rss092.xml')
  1030. );
  1031. $this->assertEquals('My Description', $feed->getDescription());
  1032. }
  1033. public function testGetsDescriptionFromRss091_Dc10()
  1034. {
  1035. $feed = Zend_Feed_Reader::importString(
  1036. file_get_contents($this->_feedSamplePath.'/description/plain/dc10/rss091.xml')
  1037. );
  1038. $this->assertEquals('My Description', $feed->getDescription());
  1039. }
  1040. public function testGetsDescriptionFromRss10_Dc10()
  1041. {
  1042. $feed = Zend_Feed_Reader::importString(
  1043. file_get_contents($this->_feedSamplePath.'/description/plain/dc10/rss10.xml')
  1044. );
  1045. $this->assertEquals('My Description', $feed->getDescription());
  1046. }
  1047. public function testGetsDescriptionFromRss090_Dc10()
  1048. {
  1049. $feed = Zend_Feed_Reader::importString(
  1050. file_get_contents($this->_feedSamplePath.'/description/plain/dc10/rss090.xml')
  1051. );
  1052. $this->assertEquals('My Description', $feed->getDescription());
  1053. }
  1054. // DC 1.1
  1055. public function testGetsDescriptionFromRss20_Dc11()
  1056. {
  1057. $feed = Zend_Feed_Reader::importString(
  1058. file_get_contents($this->_feedSamplePath.'/description/plain/dc11/rss20.xml')
  1059. );
  1060. $this->assertEquals('My Description', $feed->getDescription());
  1061. }
  1062. public function testGetsDescriptionFromRss094_Dc11()
  1063. {
  1064. $feed = Zend_Feed_Reader::importString(
  1065. file_get_contents($this->_feedSamplePath.'/description/plain/dc11/rss094.xml')
  1066. );
  1067. $this->assertEquals('My Description', $feed->getDescription());
  1068. }
  1069. public function testGetsDescriptionFromRss093_Dc11()
  1070. {
  1071. $feed = Zend_Feed_Reader::importString(
  1072. file_get_contents($this->_feedSamplePath.'/description/plain/dc11/rss093.xml')
  1073. );
  1074. $this->assertEquals('My Description', $feed->getDescription());
  1075. }
  1076. public function testGetsDescriptionFromRss092_Dc11()
  1077. {
  1078. $feed = Zend_Feed_Reader::importString(
  1079. file_get_contents($this->_feedSamplePath.'/description/plain/dc11/rss092.xml')
  1080. );
  1081. $this->assertEquals('My Description', $feed->getDescription());
  1082. }
  1083. public function testGetsDescriptionFromRss091_Dc11()
  1084. {
  1085. $feed = Zend_Feed_Reader::importString(
  1086. file_get_contents($this->_feedSamplePath.'/description/plain/dc11/rss091.xml')
  1087. );
  1088. $this->assertEquals('My Description', $feed->getDescription());
  1089. }
  1090. public function testGetsDescriptionFromRss10_Dc11()
  1091. {
  1092. $feed = Zend_Feed_Reader::importString(
  1093. file_get_contents($this->_feedSamplePath.'/description/plain/dc11/rss10.xml')
  1094. );
  1095. $this->assertEquals('My Description', $feed->getDescription());
  1096. }
  1097. public function testGetsDescriptionFromRss090_Dc11()
  1098. {
  1099. $feed = Zend_Feed_Reader::importString(
  1100. file_get_contents($this->_feedSamplePath.'/description/plain/dc11/rss090.xml')
  1101. );
  1102. $this->assertEquals('My Description', $feed->getDescription());
  1103. }
  1104. // Missing Description
  1105. public function testGetsDescriptionFromRss20_None()
  1106. {
  1107. $feed = Zend_Feed_Reader::importString(
  1108. file_get_contents($this->_feedSamplePath.'/description/plain/none/rss20.xml')
  1109. );
  1110. $this->assertEquals(null, $feed->getDescription());
  1111. }
  1112. public function testGetsDescriptionFromRss094_None()
  1113. {
  1114. $feed = Zend_Feed_Reader::importString(
  1115. file_get_contents($this->_feedSamplePath.'/description/plain/none/rss094.xml')
  1116. );
  1117. $this->assertEquals(null, $feed->getDescription());
  1118. }
  1119. public function testGetsDescriptionFromRss093_None()
  1120. {
  1121. $feed = Zend_Feed_Reader::importString(
  1122. file_get_contents($this->_feedSamplePath.'/description/plain/none/rss093.xml')
  1123. );
  1124. $this->assertEquals(null, $feed->getDescription());
  1125. }
  1126. public function testGetsDescriptionFromRss092_None()
  1127. {
  1128. $feed = Zend_Feed_Reader::importString(
  1129. file_get_contents($this->_feedSamplePath.'/description/plain/none/rss092.xml')
  1130. );
  1131. $this->assertEquals(null, $feed->getDescription());
  1132. }
  1133. public function testGetsDescriptionFromRss091_None()
  1134. {
  1135. $feed = Zend_Feed_Reader::importString(
  1136. file_get_contents($this->_feedSamplePath.'/description/plain/none/rss091.xml')
  1137. );
  1138. $this->assertEquals(null, $feed->getDescription());
  1139. }
  1140. public function testGetsDescriptionFromRss10_None()
  1141. {
  1142. $feed = Zend_Feed_Reader::importString(
  1143. file_get_contents($this->_feedSamplePath.'/description/plain/none/rss10.xml')
  1144. );
  1145. $this->assertEquals(null, $feed->getDescription());
  1146. }
  1147. public function testGetsDescriptionFromRss090_None()
  1148. {
  1149. $feed = Zend_Feed_Reader::importString(
  1150. file_get_contents($this->_feedSamplePath.'/description/plain/none/rss090.xml')
  1151. );
  1152. $this->assertEquals(null, $feed->getDescription());
  1153. }
  1154. /**
  1155. * Get Language (Unencoded Text)
  1156. */
  1157. public function testGetsLanguageFromRss20()
  1158. {
  1159. $feed = Zend_Feed_Reader::importString(
  1160. file_get_contents($this->_feedSamplePath.'/language/plain/rss20.xml')
  1161. );
  1162. $this->assertEquals('en-GB', $feed->getLanguage());
  1163. }
  1164. public function testGetsLanguageFromRss094()
  1165. {
  1166. $feed = Zend_Feed_Reader::importString(
  1167. file_get_contents($this->_feedSamplePath.'/language/plain/rss094.xml')
  1168. );
  1169. $this->assertEquals('en-GB', $feed->getLanguage());
  1170. }
  1171. public function testGetsLanguageFromRss093()
  1172. {
  1173. $feed = Zend_Feed_Reader::importString(
  1174. file_get_contents($this->_feedSamplePath.'/language/plain/rss093.xml')
  1175. );
  1176. $this->assertEquals('en-GB', $feed->getLanguage());
  1177. }
  1178. public function testGetsLanguageFromRss092()
  1179. {
  1180. $feed = Zend_Feed_Reader::importString(
  1181. file_get_contents($this->_feedSamplePath.'/language/plain/rss092.xml')
  1182. );
  1183. $this->assertEquals('en-GB', $feed->getLanguage());
  1184. }
  1185. public function testGetsLanguageFromRss091()
  1186. {
  1187. $feed = Zend_Feed_Reader::importString(
  1188. file_get_contents($this->_feedSamplePath.'/language/plain/rss091.xml')
  1189. );
  1190. $this->assertEquals('en-GB', $feed->getLanguage());
  1191. }
  1192. public function testGetsLanguageFromRss10()
  1193. {
  1194. $feed = Zend_Feed_Reader::importString(
  1195. file_get_contents($this->_feedSamplePath.'/language/plain/rss10.xml')
  1196. );
  1197. $this->assertEquals(null, $feed->getLanguage());
  1198. }
  1199. public function testGetsLanguageFromRss090()
  1200. {
  1201. $feed = Zend_Feed_Reader::importString(
  1202. file_get_contents($this->_feedSamplePath.'/language/plain/rss090.xml')
  1203. );
  1204. $this->assertEquals(null, $feed->getLanguage());
  1205. }
  1206. // DC 1.0
  1207. public function testGetsLanguageFromRss20_Dc10()
  1208. {
  1209. $feed = Zend_Feed_Reader::importString(
  1210. file_get_contents($this->_feedSamplePath.'/language/plain/dc10/rss20.xml')
  1211. );
  1212. $this->assertEquals('en-GB', $feed->getLanguage());
  1213. }
  1214. public function testGetsLanguageFromRss094_Dc10()
  1215. {
  1216. $feed = Zend_Feed_Reader::importString(
  1217. file_get_contents($this->_feedSamplePath.'/language/plain/dc10/rss094.xml')
  1218. );
  1219. $this->assertEquals('en-GB', $feed->getLanguage());
  1220. }
  1221. public function testGetsLanguageFromRss093_Dc10()
  1222. {
  1223. $feed = Zend_Feed_Reader::importString(
  1224. file_get_contents($this->_feedSamplePath.'/language/plain/dc10/rss093.xml')
  1225. );
  1226. $this->assertEquals('en-GB', $feed->getLanguage());
  1227. }
  1228. public function testGetsLanguageFromRss092_Dc10()
  1229. {
  1230. $feed = Zend_Feed_Reader::importString(
  1231. file_get_contents($this->_feedSamplePath.'/language/plain/dc10/rss092.xml')
  1232. );
  1233. $this->assertEquals('en-GB', $feed->getLanguage());
  1234. }
  1235. public function testGetsLanguageFromRss091_Dc10()
  1236. {
  1237. $feed = Zend_Feed_Reader::importString(
  1238. file_get_contents($this->_feedSamplePath.'/language/plain/dc10/rss091.xml')
  1239. );
  1240. $this->assertEquals('en-GB', $feed->getLanguage());
  1241. }
  1242. public function testGetsLanguageFromRss10_Dc10()
  1243. {
  1244. $feed = Zend_Feed_Reader::importString(
  1245. file_get_contents($this->_feedSamplePath.'/language/plain/dc10/rss10.xml')
  1246. );
  1247. $this->assertEquals('en-GB', $feed->getLanguage());
  1248. }
  1249. public function testGetsLanguageFromRss090_Dc10()
  1250. {
  1251. $feed = Zend_Feed_Reader::importString(
  1252. file_get_contents($this->_feedSamplePath.'/language/plain/dc10/rss090.xml')
  1253. );
  1254. $this->assertEquals('en-GB', $feed->getLanguage());
  1255. }
  1256. // DC 1.1
  1257. public function testGetsLanguageFromRss20_Dc11()
  1258. {
  1259. $feed = Zend_Feed_Reader::importString(
  1260. file_get_contents($this->_feedSamplePath.'/language/plain/dc11/rss20.xml')
  1261. );
  1262. $this->assertEquals('en-GB', $feed->getLanguage());
  1263. }
  1264. public function testGetsLanguageFromRss094_Dc11()
  1265. {
  1266. $feed = Zend_Feed_Reader::importString(
  1267. file_get_contents($this->_feedSamplePath.'/language/plain/dc11/rss094.xml')
  1268. );
  1269. $this->assertEquals('en-GB', $feed->getLanguage());
  1270. }
  1271. public function testGetsLanguageFromRss093_Dc11()
  1272. {
  1273. $feed = Zend_Feed_Reader::importString(
  1274. file_get_contents($this->_feedSamplePath.'/language/plain/dc11/rss093.xml')
  1275. );
  1276. $this->assertEquals('en-GB', $feed->getLanguage());
  1277. }
  1278. public function testGetsLanguageFromRss092_Dc11()
  1279. {
  1280. $feed = Zend_Feed_Reader::importString(
  1281. file_get_contents($this->_feedSamplePath.'/language/plain/dc11/rss092.xml')
  1282. );
  1283. $this->assertEquals('en-GB', $feed->getLanguage());
  1284. }
  1285. public function testGetsLanguageFromRss091_Dc11()
  1286. {
  1287. $feed = Zend_Feed_Reader::importString(
  1288. file_get_contents($this->_feedSamplePath.'/language/plain/dc11/rss091.xml')
  1289. );
  1290. $this->assertEquals('en-GB', $feed->getLanguage());
  1291. }
  1292. public function testGetsLanguageFromRss10_Dc11()
  1293. {
  1294. $feed = Zend_Feed_Reader::importString(
  1295. file_get_contents($this->_feedSamplePath.'/language/plain/dc11/rss10.xml')
  1296. );
  1297. $this->assertEquals('en-GB', $feed->getLanguage());
  1298. }
  1299. public function testGetsLanguageFromRss090_Dc11()
  1300. {
  1301. $feed = Zend_Feed_Reader::importString(
  1302. file_get_contents($this->_feedSamplePath.'/language/plain/dc11/rss090.xml')
  1303. );
  1304. $this->assertEquals('en-GB', $feed->getLanguage());
  1305. }
  1306. // Other
  1307. public function testGetsLanguageFromRss10_XmlLang()
  1308. {
  1309. $feed = Zend_Feed_Reader::importString(
  1310. file_get_contents($this->_feedSamplePath.'/language/plain/rdf/rss10.xml')
  1311. );
  1312. $this->assertEquals('en', $feed->getLanguage());
  1313. }
  1314. // Missing Language
  1315. public function testGetsLanguageFromRss20_None()
  1316. {
  1317. $feed = Zend_Feed_Reader::importString(
  1318. file_get_contents($this->_feedSamplePath.'/language/plain/none/rss20.xml')
  1319. );
  1320. $this->assertEquals(null, $feed->getLanguage());
  1321. }
  1322. public function testGetsLanguageFromRss094_None()
  1323. {
  1324. $feed = Zend_Feed_Reader::importString(
  1325. file_get_contents($this->_feedSamplePath.'/language/plain/none/rss094.xml')
  1326. );
  1327. $this->assertEquals(null, $feed->getLanguage());
  1328. }
  1329. public function testGetsLanguageFromRss093_None()
  1330. {
  1331. $feed = Zend_Feed_Reader::importString(
  1332. file_get_contents($this->_feedSamplePath.'/language/plain/none/rss093.xml')
  1333. );
  1334. $this->assertEquals(null, $feed->getLanguage());
  1335. }
  1336. public function testGetsLanguageFromRss092_None()
  1337. {
  1338. $feed = Zend_Feed_Reader::importString(
  1339. file_get_contents($this->_feedSamplePath.'/language/plain/none/rss092.xml')
  1340. );
  1341. $this->assertEquals(null, $feed->getLanguage());
  1342. }
  1343. public function testGetsLanguageFromRss091_None()
  1344. {
  1345. $feed = Zend_Feed_Reader::importString(
  1346. file_get_contents($this->_feedSamplePath.'/language/plain/none/rss091.xml')
  1347. );
  1348. $this->assertEquals(null, $feed->getLanguage());
  1349. }
  1350. public function testGetsLanguageFromRss10_None()
  1351. {
  1352. $feed = Zend_Feed_Reader::importString(
  1353. file_get_contents($this->_feedSamplePath.'/language/plain/none/rss10.xml')
  1354. );
  1355. $this->assertEquals(null, $feed->getLanguage());
  1356. }
  1357. public function testGetsLanguageFromRss090_None()
  1358. {
  1359. $feed = Zend_Feed_Reader::importString(
  1360. file_get_contents($this->_feedSamplePath.'/language/plain/none/rss090.xml')
  1361. );
  1362. $this->assertEquals(null, $feed->getLanguage());
  1363. }
  1364. /**
  1365. * Get Link (Unencoded Text)
  1366. */
  1367. public function testGetsLinkFromRss20()
  1368. {
  1369. $feed = Zend_Feed_Reader::importString(
  1370. file_get_contents($this->_feedSamplePath.'/link/plain/rss20.xml')
  1371. );
  1372. $this->assertEquals('http://www.example.com', $feed->getLink());
  1373. }
  1374. public function testGetsLinkFromRss094()
  1375. {
  1376. $feed = Zend_Feed_Reader::importString(
  1377. file_get_contents($this->_feedSamplePath.'/link/plain/rss094.xml')
  1378. );
  1379. $this->assertEquals('http://www.example.com', $feed->getLink());
  1380. }
  1381. public function testGetsLinkFromRss093()
  1382. {
  1383. $feed = Zend_Feed_Reader::importString(
  1384. file_get_contents($this->_feedSamplePath.'/link/plain/rss093.xml')
  1385. );
  1386. $this->assertEquals('http://www.example.com', $feed->getLink());
  1387. }
  1388. public function testGetsLinkFromRss092()
  1389. {
  1390. $feed = Zend_Feed_Reader::importString(
  1391. file_get_contents($this->_feedSamplePath.'/link/plain/rss092.xml')
  1392. );
  1393. $this->assertEquals('http://www.example.com', $feed->getLink());
  1394. }
  1395. public function testGetsLinkFromRss091()
  1396. {
  1397. $feed = Zend_Feed_Reader::importString(
  1398. file_get_contents($this->_feedSamplePath.'/link/plain/rss091.xml')
  1399. );
  1400. $this->assertEquals('http://www.example.com', $feed->getLink());
  1401. }
  1402. public function testGetsLinkFromRss10()
  1403. {
  1404. $feed = Zend_Feed_Reader::importString(
  1405. file_get_contents($this->_feedSamplePath.'/link/plain/rss10.xml')
  1406. );
  1407. $this->assertEquals('http://www.example.com', $feed->getLink());
  1408. }
  1409. public function testGetsLinkFromRss090()
  1410. {
  1411. $feed = Zend_Feed_Reader::importString(
  1412. file_get_contents($this->_feedSamplePath.'/link/plain/rss090.xml')
  1413. );
  1414. $this->assertEquals('http://www.example.com', $feed->getLink());
  1415. }
  1416. // Missing Link
  1417. public function testGetsLinkFromRss20_None()
  1418. {
  1419. $feed = Zend_Feed_Reader::importString(
  1420. file_get_contents($this->_feedSamplePath.'/link/plain/none/rss20.xml')
  1421. );
  1422. $this->assertEquals(null, $feed->getLink());
  1423. }
  1424. public function testGetsLinkFromRss094_None()
  1425. {
  1426. $feed = Zend_Feed_Reader::importString(
  1427. file_get_contents($this->_feedSamplePath.'/link/plain/none/rss094.xml')
  1428. );
  1429. $this->assertEquals(null, $feed->getLink());
  1430. }
  1431. public function testGetsLinkFromRss093_None()
  1432. {
  1433. $feed = Zend_Feed_Reader::importString(
  1434. file_get_contents($this->_feedSamplePath.'/link/plain/none/rss093.xml')
  1435. );
  1436. $this->assertEquals(null, $feed->getLink());
  1437. }
  1438. public function testGetsLinkFromRss092_None()
  1439. {
  1440. $feed = Zend_Feed_Reader::importString(
  1441. file_get_contents($this->_feedSamplePath.'/link/plain/none/rss092.xml')
  1442. );
  1443. $this->assertEquals(null, $feed->getLink());
  1444. }
  1445. public function testGetsLinkFromRss091_None()
  1446. {
  1447. $feed = Zend_Feed_Reader::importString(
  1448. file_get_contents($this->_feedSamplePath.'/link/plain/none/rss091.xml')
  1449. );
  1450. $this->assertEquals(null, $feed->getLink());
  1451. }
  1452. public function testGetsLinkFromRss10_None()
  1453. {
  1454. $feed = Zend_Feed_Reader::importString(
  1455. file_get_contents($this->_feedSamplePath.'/link/plain/none/rss10.xml')
  1456. );
  1457. $this->assertEquals(null, $feed->getLink());
  1458. }
  1459. public function testGetsLinkFromRss090_None()
  1460. {
  1461. $feed = Zend_Feed_Reader::importString(
  1462. file_get_contents($this->_feedSamplePath.'/link/plain/none/rss090.xml')
  1463. );
  1464. $this->assertEquals(null, $feed->getLink());
  1465. }
  1466. /**
  1467. * Implements Countable
  1468. */
  1469. public function testCountableInterface()
  1470. {
  1471. $feed = Zend_Feed_Reader::importString(
  1472. file_get_contents($this->_feedSamplePath.'/link/plain/none/rss090.xml')
  1473. );
  1474. $this->assertEquals(0, count($feed));
  1475. }
  1476. /**
  1477. * Get Feed Link (Unencoded Text)
  1478. */
  1479. public function testGetsFeedLinkFromRss20()
  1480. {
  1481. $feed = Zend_Feed_Reader::importString(
  1482. file_get_contents($this->_feedSamplePath.'/feedlink/plain/rss20.xml')
  1483. );
  1484. $this->assertEquals('http://www.example.com/feed/rss', $feed->getFeedLink());
  1485. }
  1486. public function testGetsFeedLinkFromRss094()
  1487. {
  1488. $feed = Zend_Feed_Reader::importString(
  1489. file_get_contents($this->_feedSamplePath.'/feedlink/plain/rss094.xml')
  1490. );
  1491. $this->assertEquals('http://www.example.com/feed/rss', $feed->getFeedLink());
  1492. }
  1493. public function testGetsFeedLinkFromRss093()
  1494. {
  1495. $feed = Zend_Feed_Reader::importString(
  1496. file_get_contents($this->_feedSamplePath.'/feedlink/plain/rss093.xml')
  1497. );
  1498. $this->assertEquals('http://www.example.com/feed/rss', $feed->getFeedLink());
  1499. }
  1500. public function testGetsFeedLinkFromRss092()
  1501. {
  1502. $feed = Zend_Feed_Reader::importString(
  1503. file_get_contents($this->_feedSamplePath.'/feedlink/plain/rss092.xml')
  1504. );
  1505. $this->assertEquals('http://www.example.com/feed/rss', $feed->getFeedLink());
  1506. }
  1507. public function testGetsFeedLinkFromRss091()
  1508. {
  1509. $feed = Zend_Feed_Reader::importString(
  1510. file_get_contents($this->_feedSamplePath.'/feedlink/plain/rss091.xml')
  1511. );
  1512. $this->assertEquals('http://www.example.com/feed/rss', $feed->getFeedLink());
  1513. }
  1514. public function testGetsFeedLinkFromRss10()
  1515. {
  1516. $feed = Zend_Feed_Reader::importString(
  1517. file_get_contents($this->_feedSamplePath.'/feedlink/plain/rss10.xml')
  1518. );
  1519. $this->assertEquals('http://www.example.com/feed/rss', $feed->getFeedLink());
  1520. }
  1521. public function testGetsFeedLinkFromRss090()
  1522. {
  1523. $feed = Zend_Feed_Reader::importString(
  1524. file_get_contents($this->_feedSamplePath.'/feedlink/plain/rss090.xml')
  1525. );
  1526. $this->assertEquals('http://www.example.com/feed/rss', $feed->getFeedLink());
  1527. }
  1528. // Missing Feed Link
  1529. public function testGetsFeedLinkFromRss20_None()
  1530. {
  1531. $feed = Zend_Feed_Reader::importString(
  1532. file_get_contents($this->_feedSamplePath.'/feedlink/plain/none/rss20.xml')
  1533. );
  1534. $this->assertEquals(null, $feed->getFeedLink());
  1535. }
  1536. public function testGetsFeedLinkFromRss094_None()
  1537. {
  1538. $feed = Zend_Feed_Reader::importString(
  1539. file_get_contents($this->_feedSamplePath.'/feedlink/plain/none/rss094.xml')
  1540. );
  1541. $this->assertEquals(null, $feed->getFeedLink());
  1542. }
  1543. public function testGetsFeedLinkFromRss093_None()
  1544. {
  1545. $feed = Zend_Feed_Reader::importString(
  1546. file_get_contents($this->_feedSamplePath.'/feedlink/plain/none/rss093.xml')
  1547. );
  1548. $this->assertEquals(null, $feed->getFeedLink());
  1549. }
  1550. public function testGetsFeedLinkFromRss092_None()
  1551. {
  1552. $feed = Zend_Feed_Reader::importString(
  1553. file_get_contents($this->_feedSamplePath.'/feedlink/plain/none/rss092.xml')
  1554. );
  1555. $this->assertEquals(null, $feed->getFeedLink());
  1556. }
  1557. public function testGetsFeedLinkFromRss091_None()
  1558. {
  1559. $feed = Zend_Feed_Reader::importString(
  1560. file_get_contents($this->_feedSamplePath.'/feedlink/plain/none/rss091.xml')
  1561. );
  1562. $this->assertEquals(null, $feed->getFeedLink());
  1563. }
  1564. public function testGetsFeedLinkFromRss10_None()
  1565. {
  1566. $feed = Zend_Feed_Reader::importString(
  1567. file_get_contents($this->_feedSamplePath.'/feedlink/plain/none/rss10.xml')
  1568. );
  1569. $this->assertEquals(null, $feed->getFeedLink());
  1570. }
  1571. public function testGetsFeedLinkFromRss090_None()
  1572. {
  1573. $feed = Zend_Feed_Reader::importString(
  1574. file_get_contents($this->_feedSamplePath.'/feedlink/plain/none/rss090.xml')
  1575. );
  1576. $this->assertEquals(null, $feed->getFeedLink());
  1577. }
  1578. /**
  1579. * Get Generator (Unencoded Text)
  1580. */
  1581. public function testGetsGeneratorFromRss20()
  1582. {
  1583. $feed = Zend_Feed_Reader::importString(
  1584. file_get_contents($this->_feedSamplePath.'/generator/plain/rss20.xml')
  1585. );
  1586. $this->assertEquals('Zend_Feed_Writer', $feed->getGenerator());
  1587. }
  1588. public function testGetsGeneratorFromRss094()
  1589. {
  1590. $feed = Zend_Feed_Reader::importString(
  1591. file_get_contents($this->_feedSamplePath.'/generator/plain/rss094.xml')
  1592. );
  1593. $this->assertEquals('Zend_Feed_Writer', $feed->getGenerator());
  1594. }
  1595. public function testGetsGeneratorFromRss093()
  1596. {
  1597. $feed = Zend_Feed_Reader::importString(
  1598. file_get_contents($this->_feedSamplePath.'/generator/plain/rss093.xml')
  1599. );
  1600. $this->assertEquals('Zend_Feed_Writer', $feed->getGenerator());
  1601. }
  1602. public function testGetsGeneratorFromRss092()
  1603. {
  1604. $feed = Zend_Feed_Reader::importString(
  1605. file_get_contents($this->_feedSamplePath.'/generator/plain/rss092.xml')
  1606. );
  1607. $this->assertEquals('Zend_Feed_Writer', $feed->getGenerator());
  1608. }
  1609. public function testGetsGeneratorFromRss091()
  1610. {
  1611. $feed = Zend_Feed_Reader::importString(
  1612. file_get_contents($this->_feedSamplePath.'/generator/plain/rss091.xml')
  1613. );
  1614. $this->assertEquals('Zend_Feed_Writer', $feed->getGenerator());
  1615. }
  1616. public function testGetsGeneratorFromRss10()
  1617. {
  1618. $feed = Zend_Feed_Reader::importString(
  1619. file_get_contents($this->_feedSamplePath.'/generator/plain/rss10.xml')
  1620. );
  1621. $this->assertEquals('Zend_Feed_Writer', $feed->getGenerator());
  1622. }
  1623. public function testGetsGeneratorFromRss090()
  1624. {
  1625. $feed = Zend_Feed_Reader::importString(
  1626. file_get_contents($this->_feedSamplePath.'/generator/plain/rss090.xml')
  1627. );
  1628. $this->assertEquals('Zend_Feed_Writer', $feed->getGenerator());
  1629. }
  1630. // Missing Generator
  1631. public function testGetsGeneratorFromRss20_None()
  1632. {
  1633. $feed = Zend_Feed_Reader::importString(
  1634. file_get_contents($this->_feedSamplePath.'/generator/plain/none/rss20.xml')
  1635. );
  1636. $this->assertEquals(null, $feed->getGenerator());
  1637. }
  1638. public function testGetsGeneratorFromRss094_None()
  1639. {
  1640. $feed = Zend_Feed_Reader::importString(
  1641. file_get_contents($this->_feedSamplePath.'/generator/plain/none/rss094.xml')
  1642. );
  1643. $this->assertEquals(null, $feed->getGenerator());
  1644. }
  1645. public function testGetsGeneratorFromRss093_None()
  1646. {
  1647. $feed = Zend_Feed_Reader::importString(
  1648. file_get_contents($this->_feedSamplePath.'/generator/plain/none/rss093.xml')
  1649. );
  1650. $this->assertEquals(null, $feed->getGenerator());
  1651. }
  1652. public function testGetsGeneratorFromRss092_None()
  1653. {
  1654. $feed = Zend_Feed_Reader::importString(
  1655. file_get_contents($this->_feedSamplePath.'/generator/plain/none/rss092.xml')
  1656. );
  1657. $this->assertEquals(null, $feed->getGenerator());
  1658. }
  1659. public function testGetsGeneratorFromRss091_None()
  1660. {
  1661. $feed = Zend_Feed_Reader::importString(
  1662. file_get_contents($this->_feedSamplePath.'/generator/plain/none/rss091.xml')
  1663. );
  1664. $this->assertEquals(null, $feed->getGenerator());
  1665. }
  1666. public function testGetsGeneratorFromRss10_None()
  1667. {
  1668. $feed = Zend_Feed_Reader::importString(
  1669. file_get_contents($this->_feedSamplePath.'/generator/plain/none/rss10.xml')
  1670. );
  1671. $this->assertEquals(null, $feed->getGenerator());
  1672. }
  1673. public function testGetsGeneratorFromRss090_None()
  1674. {
  1675. $feed = Zend_Feed_Reader::importString(
  1676. file_get_contents($this->_feedSamplePath.'/generator/plain/none/rss090.xml')
  1677. );
  1678. $this->assertEquals(null, $feed->getGenerator());
  1679. }
  1680. /**
  1681. * Get Date Modified (Unencoded Text)
  1682. */
  1683. public function testGetsDateModifiedFromRss20()
  1684. {
  1685. $feed = Zend_Feed_Reader::importString(
  1686. file_get_contents($this->_feedSamplePath.'/datemodified/plain/rss20.xml')
  1687. );
  1688. $this->assertEquals('Saturday 07 March 2009 08 03 50 +0000',
  1689. $feed->getDateModified()->toString('EEEE dd MMMM YYYY HH mm ss ZZZ'));
  1690. }
  1691. // DC 1.0
  1692. public function testGetsDateModifiedFromRss20_Dc10()
  1693. {
  1694. $feed = Zend_Feed_Reader::importString(
  1695. file_get_contents($this->_feedSamplePath.'/datemodified/plain/dc10/rss20.xml')
  1696. );
  1697. $this->assertEquals('Saturday 07 March 2009 08 03 50 +0000',
  1698. $feed->getDateModified()->toString('EEEE dd MMMM YYYY HH mm ss ZZZ'));
  1699. }
  1700. public function testGetsDateModifiedFromRss094_Dc10()
  1701. {
  1702. $feed = Zend_Feed_Reader::importString(
  1703. file_get_contents($this->_feedSamplePath.'/datemodified/plain/dc10/rss094.xml')
  1704. );
  1705. $this->assertEquals('Saturday 07 March 2009 08 03 50 +0000',
  1706. $feed->getDateModified()->toString('EEEE dd MMMM YYYY HH mm ss ZZZ'));
  1707. }
  1708. public function testGetsDateModifiedFromRss093_Dc10()
  1709. {
  1710. $feed = Zend_Feed_Reader::importString(
  1711. file_get_contents($this->_feedSamplePath.'/datemodified/plain/dc10/rss093.xml')
  1712. );
  1713. $this->assertEquals('Saturday 07 March 2009 08 03 50 +0000',
  1714. $feed->getDateModified()->toString('EEEE dd MMMM YYYY HH mm ss ZZZ'));
  1715. }
  1716. public function testGetsDateModifiedFromRss092_Dc10()
  1717. {
  1718. $feed = Zend_Feed_Reader::importString(
  1719. file_get_contents($this->_feedSamplePath.'/datemodified/plain/dc10/rss092.xml')
  1720. );
  1721. $this->assertEquals('Saturday 07 March 2009 08 03 50 +0000',
  1722. $feed->getDateModified()->toString('EEEE dd MMMM YYYY HH mm ss ZZZ'));
  1723. }
  1724. public function testGetsDateModifiedFromRss091_Dc10()
  1725. {
  1726. $feed = Zend_Feed_Reader::importString(
  1727. file_get_contents($this->_feedSamplePath.'/datemodified/plain/dc10/rss091.xml')
  1728. );
  1729. $this->assertEquals('Saturday 07 March 2009 08 03 50 +0000',
  1730. $feed->getDateModified()->toString('EEEE dd MMMM YYYY HH mm ss ZZZ'));
  1731. }
  1732. public function testGetsDateModifiedFromRss10_Dc10()
  1733. {
  1734. $feed = Zend_Feed_Reader::importString(
  1735. file_get_contents($this->_feedSamplePath.'/datemodified/plain/dc10/rss10.xml')
  1736. );
  1737. $this->assertEquals('Saturday 07 March 2009 08 03 50 +0000',
  1738. $feed->getDateModified()->toString('EEEE dd MMMM YYYY HH mm ss ZZZ'));
  1739. }
  1740. public function testGetsDateModifiedFromRss090_Dc10()
  1741. {
  1742. $feed = Zend_Feed_Reader::importString(
  1743. file_get_contents($this->_feedSamplePath.'/datemodified/plain/dc10/rss090.xml')
  1744. );
  1745. $this->assertEquals('Saturday 07 March 2009 08 03 50 +0000',
  1746. $feed->getDateModified()->toString('EEEE dd MMMM YYYY HH mm ss ZZZ'));
  1747. }
  1748. // DC 1.1
  1749. public function testGetsDateModifiedFromRss20_Dc11()
  1750. {
  1751. $feed = Zend_Feed_Reader::importString(
  1752. file_get_contents($this->_feedSamplePath.'/datemodified/plain/dc11/rss20.xml')
  1753. );
  1754. $this->assertEquals('Saturday 07 March 2009 08 03 50 +0000',
  1755. $feed->getDateModified()->toString('EEEE dd MMMM YYYY HH mm ss ZZZ'));
  1756. }
  1757. public function testGetsDateModifiedFromRss094_Dc11()
  1758. {
  1759. $feed = Zend_Feed_Reader::importString(
  1760. file_get_contents($this->_feedSamplePath.'/datemodified/plain/dc11/rss094.xml')
  1761. );
  1762. $this->assertEquals('Saturday 07 March 2009 08 03 50 +0000',
  1763. $feed->getDateModified()->toString('EEEE dd MMMM YYYY HH mm ss ZZZ'));
  1764. }
  1765. public function testGetsDateModifiedFromRss093_Dc11()
  1766. {
  1767. $feed = Zend_Feed_Reader::importString(
  1768. file_get_contents($this->_feedSamplePath.'/datemodified/plain/dc11/rss093.xml')
  1769. );
  1770. $this->assertEquals('Saturday 07 March 2009 08 03 50 +0000',
  1771. $feed->getDateModified()->toString('EEEE dd MMMM YYYY HH mm ss ZZZ'));
  1772. }
  1773. public function testGetsDateModifiedFromRss092_Dc11()
  1774. {
  1775. $feed = Zend_Feed_Reader::importString(
  1776. file_get_contents($this->_feedSamplePath.'/datemodified/plain/dc11/rss092.xml')
  1777. );
  1778. $this->assertEquals('Saturday 07 March 2009 08 03 50 +0000',
  1779. $feed->getDateModified()->toString('EEEE dd MMMM YYYY HH mm ss ZZZ'));
  1780. }
  1781. public function testGetsDateModifiedFromRss091_Dc11()
  1782. {
  1783. $feed = Zend_Feed_Reader::importString(
  1784. file_get_contents($this->_feedSamplePath.'/datemodified/plain/dc11/rss091.xml')
  1785. );
  1786. $this->assertEquals('Saturday 07 March 2009 08 03 50 +0000',
  1787. $feed->getDateModified()->toString('EEEE dd MMMM YYYY HH mm ss ZZZ'));
  1788. }
  1789. public function testGetsDateModifiedFromRss10_Dc11()
  1790. {
  1791. $feed = Zend_Feed_Reader::importString(
  1792. file_get_contents($this->_feedSamplePath.'/datemodified/plain/dc11/rss10.xml')
  1793. );
  1794. $this->assertEquals('Saturday 07 March 2009 08 03 50 +0000',
  1795. $feed->getDateModified()->toString('EEEE dd MMMM YYYY HH mm ss ZZZ'));
  1796. }
  1797. public function testGetsDateModifiedFromRss090_Dc11()
  1798. {
  1799. $feed = Zend_Feed_Reader::importString(
  1800. file_get_contents($this->_feedSamplePath.'/datemodified/plain/dc11/rss090.xml')
  1801. );
  1802. $this->assertEquals('Saturday 07 March 2009 08 03 50 +0000',
  1803. $feed->getDateModified()->toString('EEEE dd MMMM YYYY HH mm ss ZZZ'));
  1804. }
  1805. // Atom 1.0
  1806. public function testGetsDateModifiedFromRss20_atom10()
  1807. {
  1808. $feed = Zend_Feed_Reader::importString(
  1809. file_get_contents($this->_feedSamplePath.'/datemodified/plain/atom10/rss20.xml')
  1810. );
  1811. $this->assertEquals('Saturday 07 March 2009 08 03 50 +0000',
  1812. $feed->getDateModified()->toString('EEEE dd MMMM YYYY HH mm ss ZZZ'));
  1813. }
  1814. public function testGetsDateModifiedFromRss094_atom10()
  1815. {
  1816. $feed = Zend_Feed_Reader::importString(
  1817. file_get_contents($this->_feedSamplePath.'/datemodified/plain/atom10/rss094.xml')
  1818. );
  1819. $this->assertEquals('Saturday 07 March 2009 08 03 50 +0000',
  1820. $feed->getDateModified()->toString('EEEE dd MMMM YYYY HH mm ss ZZZ'));
  1821. }
  1822. public function testGetsDateModifiedFromRss093_atom10()
  1823. {
  1824. $feed = Zend_Feed_Reader::importString(
  1825. file_get_contents($this->_feedSamplePath.'/datemodified/plain/atom10/rss093.xml')
  1826. );
  1827. $this->assertEquals('Saturday 07 March 2009 08 03 50 +0000',
  1828. $feed->getDateModified()->toString('EEEE dd MMMM YYYY HH mm ss ZZZ'));
  1829. }
  1830. public function testGetsDateModifiedFromRss092_atom10()
  1831. {
  1832. $feed = Zend_Feed_Reader::importString(
  1833. file_get_contents($this->_feedSamplePath.'/datemodified/plain/atom10/rss092.xml')
  1834. );
  1835. $this->assertEquals('Saturday 07 March 2009 08 03 50 +0000',
  1836. $feed->getDateModified()->toString('EEEE dd MMMM YYYY HH mm ss ZZZ'));
  1837. }
  1838. public function testGetsDateModifiedFromRss091_atom10()
  1839. {
  1840. $feed = Zend_Feed_Reader::importString(
  1841. file_get_contents($this->_feedSamplePath.'/datemodified/plain/atom10/rss091.xml')
  1842. );
  1843. $this->assertEquals('Saturday 07 March 2009 08 03 50 +0000',
  1844. $feed->getDateModified()->toString('EEEE dd MMMM YYYY HH mm ss ZZZ'));
  1845. }
  1846. public function testGetsDateModifiedFromRss10_atom10()
  1847. {
  1848. $feed = Zend_Feed_Reader::importString(
  1849. file_get_contents($this->_feedSamplePath.'/datemodified/plain/atom10/rss10.xml')
  1850. );
  1851. $this->assertEquals('Saturday 07 March 2009 08 03 50 +0000',
  1852. $feed->getDateModified()->toString('EEEE dd MMMM YYYY HH mm ss ZZZ'));
  1853. }
  1854. public function testGetsDateModifiedFromRss090_atom10()
  1855. {
  1856. $feed = Zend_Feed_Reader::importString(
  1857. file_get_contents($this->_feedSamplePath.'/datemodified/plain/atom10/rss090.xml')
  1858. );
  1859. $this->assertEquals('Saturday 07 March 2009 08 03 50 +0000',
  1860. $feed->getDateModified()->toString('EEEE dd MMMM YYYY HH mm ss ZZZ'));
  1861. }
  1862. // Missing DateModified
  1863. public function testGetsDateModifiedFromRss20_None()
  1864. {
  1865. $feed = Zend_Feed_Reader::importString(
  1866. file_get_contents($this->_feedSamplePath.'/datemodified/plain/none/rss20.xml')
  1867. );
  1868. $this->assertEquals(null, $feed->getDateModified());
  1869. }
  1870. public function testGetsDateModifiedFromRss094_None()
  1871. {
  1872. $feed = Zend_Feed_Reader::importString(
  1873. file_get_contents($this->_feedSamplePath.'/datemodified/plain/none/rss094.xml')
  1874. );
  1875. $this->assertEquals(null, $feed->getDateModified());
  1876. }
  1877. public function testGetsDateModifiedFromRss093_None()
  1878. {
  1879. $feed = Zend_Feed_Reader::importString(
  1880. file_get_contents($this->_feedSamplePath.'/datemodified/plain/none/rss093.xml')
  1881. );
  1882. $this->assertEquals(null, $feed->getDateModified());
  1883. }
  1884. public function testGetsDateModifiedFromRss092_None()
  1885. {
  1886. $feed = Zend_Feed_Reader::importString(
  1887. file_get_contents($this->_feedSamplePath.'/datemodified/plain/none/rss092.xml')
  1888. );
  1889. $this->assertEquals(null, $feed->getDateModified());
  1890. }
  1891. public function testGetsDateModifiedFromRss091_None()
  1892. {
  1893. $feed = Zend_Feed_Reader::importString(
  1894. file_get_contents($this->_feedSamplePath.'/datemodified/plain/none/rss091.xml')
  1895. );
  1896. $this->assertEquals(null, $feed->getDateModified());
  1897. }
  1898. public function testGetsDateModifiedFromRss10_None()
  1899. {
  1900. $feed = Zend_Feed_Reader::importString(
  1901. file_get_contents($this->_feedSamplePath.'/datemodified/plain/none/rss10.xml')
  1902. );
  1903. $this->assertEquals(null, $feed->getDateModified());
  1904. }
  1905. public function testGetsDateModifiedFromRss090_None()
  1906. {
  1907. $feed = Zend_Feed_Reader::importString(
  1908. file_get_contents($this->_feedSamplePath.'/datemodified/plain/none/rss090.xml')
  1909. );
  1910. $this->assertEquals(null, $feed->getDateModified());
  1911. }
  1912. }