PageRenderTime 99ms CodeModel.GetById 30ms RepoModel.GetById 1ms app.codeStats 0ms

/tests/Zend/Feed/Reader/Entry/RssTest.php

https://bitbucket.org/dbaltas/zend-framework-1.x-on-git
PHP | 3071 lines | 2605 code | 355 blank | 111 comment | 2 complexity | 3e4cf677ed814fbd26cf0cdb7f8447de MD5 | raw file
Possible License(s): BSD-3-Clause, LGPL-2.0, MIT

Large files files are truncated, but you can click here to view the full file

  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-2012 Zend Technologies USA Inc. (http://www.zend.com)
  19. * @license http://framework.zend.com/license/new-bsd New BSD License
  20. * @version $Id: RssTest.php 24593 2012-01-05 20:35:02Z matthew $
  21. */
  22. require_once 'Zend/Feed/Reader.php';
  23. /**
  24. * @category Zend
  25. * @package Zend_Feed
  26. * @subpackage UnitTests
  27. * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
  28. * @license http://framework.zend.com/license/new-bsd New BSD License
  29. * @group Zend_Feed
  30. * @group Zend_Feed_Reader
  31. */
  32. class Zend_Feed_Reader_Entry_RssTest extends PHPUnit_Framework_TestCase
  33. {
  34. protected $_feedSamplePath = null;
  35. protected $_expectedCats = array();
  36. protected $_expectedCatsRdf = array();
  37. protected $_expectedCatsAtom = array();
  38. public function setup()
  39. {
  40. Zend_Feed_Reader::reset();
  41. if (Zend_Registry::isRegistered('Zend_Locale')) {
  42. $registry = Zend_Registry::getInstance();
  43. unset($registry['Zend_Locale']);
  44. }
  45. $this->_feedSamplePath = dirname(__FILE__) . '/_files/Rss';
  46. $this->_options = Zend_Date::setOptions();
  47. foreach($this->_options as $k=>$v) {
  48. if (is_null($v)) {
  49. unset($this->_options[$k]);
  50. }
  51. }
  52. Zend_Date::setOptions(array('format_type'=>'iso'));
  53. $this->_expectedCats = array(
  54. array(
  55. 'term' => 'topic1',
  56. 'scheme' => 'http://example.com/schema1',
  57. 'label' => 'topic1'
  58. ),
  59. array(
  60. 'term' => 'topic1',
  61. 'scheme' => 'http://example.com/schema2',
  62. 'label' => 'topic1'
  63. ),
  64. array(
  65. 'term' => 'topic2',
  66. 'scheme' => 'http://example.com/schema1',
  67. 'label' => 'topic2'
  68. )
  69. );
  70. $this->_expectedCatsRdf = array(
  71. array(
  72. 'term' => 'topic1',
  73. 'scheme' => null,
  74. 'label' => 'topic1'
  75. ),
  76. array(
  77. 'term' => 'topic2',
  78. 'scheme' => null,
  79. 'label' => 'topic2'
  80. )
  81. );
  82. $this->_expectedCatsAtom = array(
  83. array(
  84. 'term' => 'topic1',
  85. 'scheme' => 'http://example.com/schema1',
  86. 'label' => 'topic1'
  87. ),
  88. array(
  89. 'term' => 'topic1',
  90. 'scheme' => 'http://example.com/schema2',
  91. 'label' => 'topic1'
  92. ),
  93. array(
  94. 'term' => 'cat_dog',
  95. 'scheme' => 'http://example.com/schema1',
  96. 'label' => 'Cat & Dog'
  97. )
  98. );
  99. }
  100. public function teardown()
  101. {
  102. Zend_Date::setOptions($this->_options);
  103. }
  104. /**
  105. * Get Id (Unencoded Text)
  106. */
  107. public function testGetsIdFromRss20()
  108. {
  109. $feed = Zend_Feed_Reader::importString(
  110. file_get_contents($this->_feedSamplePath.'/id/plain/rss20.xml')
  111. );
  112. $entry = $feed->current();
  113. $this->assertEquals('http://www.example.com/1', $entry->getId());
  114. }
  115. public function testGetsIdFromRss094()
  116. {
  117. $feed = Zend_Feed_Reader::importString(
  118. file_get_contents($this->_feedSamplePath.'/id/plain/rss094.xml')
  119. );
  120. $entry = $feed->current();
  121. $this->assertEquals(null, $entry->getId());
  122. }
  123. public function testGetsIdFromRss093()
  124. {
  125. $feed = Zend_Feed_Reader::importString(
  126. file_get_contents($this->_feedSamplePath.'/id/plain/rss093.xml')
  127. );
  128. $entry = $feed->current();
  129. $this->assertEquals(null, $entry->getId());
  130. }
  131. public function testGetsIdFromRss092()
  132. {
  133. $feed = Zend_Feed_Reader::importString(
  134. file_get_contents($this->_feedSamplePath.'/id/plain/rss092.xml')
  135. );
  136. $entry = $feed->current();
  137. $this->assertEquals(null, $entry->getId());
  138. }
  139. public function testGetsIdFromRss091()
  140. {
  141. $feed = Zend_Feed_Reader::importString(
  142. file_get_contents($this->_feedSamplePath.'/id/plain/rss091.xml')
  143. );
  144. $entry = $feed->current();
  145. $this->assertEquals(null, $entry->getId());
  146. }
  147. public function testGetsIdFromRss10()
  148. {
  149. $feed = Zend_Feed_Reader::importString(
  150. file_get_contents($this->_feedSamplePath.'/id/plain/rss10.xml')
  151. );
  152. $entry = $feed->current();
  153. $this->assertEquals(null, $entry->getId());
  154. }
  155. public function testGetsIdFromRss090()
  156. {
  157. $feed = Zend_Feed_Reader::importString(
  158. file_get_contents($this->_feedSamplePath.'/id/plain/rss090.xml')
  159. );
  160. $entry = $feed->current();
  161. $this->assertEquals(null, $entry->getId());
  162. }
  163. // DC 1.0
  164. public function testGetsIdFromRss20_Dc10()
  165. {
  166. $feed = Zend_Feed_Reader::importString(
  167. file_get_contents($this->_feedSamplePath.'/id/plain/dc10/rss20.xml')
  168. );
  169. $entry = $feed->current();
  170. $this->assertEquals('http://www.example.com/1', $entry->getId());
  171. }
  172. public function testGetsIdFromRss094_Dc10()
  173. {
  174. $feed = Zend_Feed_Reader::importString(
  175. file_get_contents($this->_feedSamplePath.'/id/plain/dc10/rss094.xml')
  176. );
  177. $entry = $feed->current();
  178. $this->assertEquals('http://www.example.com/1', $entry->getId());
  179. }
  180. public function testGetsIdFromRss093_Dc10()
  181. {
  182. $feed = Zend_Feed_Reader::importString(
  183. file_get_contents($this->_feedSamplePath.'/id/plain/dc10/rss093.xml')
  184. );
  185. $entry = $feed->current();
  186. $this->assertEquals('http://www.example.com/1', $entry->getId());
  187. }
  188. public function testGetsIdFromRss092_Dc10()
  189. {
  190. $feed = Zend_Feed_Reader::importString(
  191. file_get_contents($this->_feedSamplePath.'/id/plain/dc10/rss092.xml')
  192. );
  193. $entry = $feed->current();
  194. $this->assertEquals('http://www.example.com/1', $entry->getId());
  195. }
  196. public function testGetsIdFromRss091_Dc10()
  197. {
  198. $feed = Zend_Feed_Reader::importString(
  199. file_get_contents($this->_feedSamplePath.'/id/plain/dc10/rss091.xml')
  200. );
  201. $entry = $feed->current();
  202. $this->assertEquals('http://www.example.com/1', $entry->getId());
  203. }
  204. public function testGetsIdFromRss10_Dc10()
  205. {
  206. $feed = Zend_Feed_Reader::importString(
  207. file_get_contents($this->_feedSamplePath.'/id/plain/dc10/rss10.xml')
  208. );
  209. $entry = $feed->current();
  210. $this->assertEquals('http://www.example.com/1', $entry->getId());
  211. }
  212. public function testGetsIdFromRss090_Dc10()
  213. {
  214. $feed = Zend_Feed_Reader::importString(
  215. file_get_contents($this->_feedSamplePath.'/id/plain/dc10/rss090.xml')
  216. );
  217. $entry = $feed->current();
  218. $this->assertEquals('http://www.example.com/1', $entry->getId());
  219. }
  220. // DC 1.1
  221. public function testGetsIdFromRss20_Dc11()
  222. {
  223. $feed = Zend_Feed_Reader::importString(
  224. file_get_contents($this->_feedSamplePath.'/id/plain/dc11/rss20.xml')
  225. );
  226. $entry = $feed->current();
  227. $this->assertEquals('http://www.example.com/1', $entry->getId());
  228. }
  229. public function testGetsIdFromRss094_Dc11()
  230. {
  231. $feed = Zend_Feed_Reader::importString(
  232. file_get_contents($this->_feedSamplePath.'/id/plain/dc11/rss094.xml')
  233. );
  234. $entry = $feed->current();
  235. $this->assertEquals('http://www.example.com/1', $entry->getId());
  236. }
  237. public function testGetsIdFromRss093_Dc11()
  238. {
  239. $feed = Zend_Feed_Reader::importString(
  240. file_get_contents($this->_feedSamplePath.'/id/plain/dc11/rss093.xml')
  241. );
  242. $entry = $feed->current();
  243. $this->assertEquals('http://www.example.com/1', $entry->getId());
  244. }
  245. public function testGetsIdFromRss092_Dc11()
  246. {
  247. $feed = Zend_Feed_Reader::importString(
  248. file_get_contents($this->_feedSamplePath.'/id/plain/dc11/rss092.xml')
  249. );
  250. $entry = $feed->current();
  251. $this->assertEquals('http://www.example.com/1', $entry->getId());
  252. }
  253. public function testGetsIdFromRss091_Dc11()
  254. {
  255. $feed = Zend_Feed_Reader::importString(
  256. file_get_contents($this->_feedSamplePath.'/id/plain/dc11/rss091.xml')
  257. );
  258. $entry = $feed->current();
  259. $this->assertEquals('http://www.example.com/1', $entry->getId());
  260. }
  261. public function testGetsIdFromRss10_Dc11()
  262. {
  263. $feed = Zend_Feed_Reader::importString(
  264. file_get_contents($this->_feedSamplePath.'/id/plain/dc11/rss10.xml')
  265. );
  266. $entry = $feed->current();
  267. $this->assertEquals('http://www.example.com/1', $entry->getId());
  268. }
  269. public function testGetsIdFromRss090_Dc11()
  270. {
  271. $feed = Zend_Feed_Reader::importString(
  272. file_get_contents($this->_feedSamplePath.'/id/plain/dc11/rss090.xml')
  273. );
  274. $entry = $feed->current();
  275. $this->assertEquals('http://www.example.com/1', $entry->getId());
  276. }
  277. // Missing Id (but alternates to Title)
  278. public function testGetsIdFromRss20_Title()
  279. {
  280. $feed = Zend_Feed_Reader::importString(
  281. file_get_contents($this->_feedSamplePath.'/id/plain/title/rss20.xml')
  282. );
  283. $entry = $feed->current();
  284. $this->assertEquals('Entry Title', $entry->getId());
  285. }
  286. public function testGetsIdFromRss094_Title()
  287. {
  288. $feed = Zend_Feed_Reader::importString(
  289. file_get_contents($this->_feedSamplePath.'/id/plain/title/rss094.xml')
  290. );
  291. $entry = $feed->current();
  292. $this->assertEquals('Entry Title', $entry->getId());
  293. }
  294. public function testGetsIdFromRss093_Title()
  295. {
  296. $feed = Zend_Feed_Reader::importString(
  297. file_get_contents($this->_feedSamplePath.'/id/plain/title/rss093.xml')
  298. );
  299. $entry = $feed->current();
  300. $this->assertEquals('Entry Title', $entry->getId());
  301. }
  302. public function testGetsIdFromRss092_Title()
  303. {
  304. $feed = Zend_Feed_Reader::importString(
  305. file_get_contents($this->_feedSamplePath.'/id/plain/title/rss092.xml')
  306. );
  307. $entry = $feed->current();
  308. $this->assertEquals('Entry Title', $entry->getId());
  309. }
  310. public function testGetsIdFromRss091_Title()
  311. {
  312. $feed = Zend_Feed_Reader::importString(
  313. file_get_contents($this->_feedSamplePath.'/id/plain/title/rss091.xml')
  314. );
  315. $entry = $feed->current();
  316. $this->assertEquals('Entry Title', $entry->getId());
  317. }
  318. public function testGetsIdFromRss10_Title()
  319. {
  320. $feed = Zend_Feed_Reader::importString(
  321. file_get_contents($this->_feedSamplePath.'/id/plain/title/rss10.xml')
  322. );
  323. $entry = $feed->current();
  324. $this->assertEquals('Entry Title', $entry->getId());
  325. }
  326. public function testGetsIdFromRss090_Title()
  327. {
  328. $feed = Zend_Feed_Reader::importString(
  329. file_get_contents($this->_feedSamplePath.'/id/plain/title/rss090.xml')
  330. );
  331. $entry = $feed->current();
  332. $this->assertEquals('Entry Title', $entry->getId());
  333. }
  334. // Missing Any Id
  335. public function testGetsIdFromRss20_None()
  336. {
  337. $feed = Zend_Feed_Reader::importString(
  338. file_get_contents($this->_feedSamplePath.'/id/plain/none/rss20.xml')
  339. );
  340. $entry = $feed->current();
  341. $this->assertEquals(null, $entry->getId());
  342. }
  343. public function testGetsIdFromRss094_None()
  344. {
  345. $feed = Zend_Feed_Reader::importString(
  346. file_get_contents($this->_feedSamplePath.'/id/plain/none/rss094.xml')
  347. );
  348. $entry = $feed->current();
  349. $this->assertEquals(null, $entry->getId());
  350. }
  351. public function testGetsIdFromRss093_None()
  352. {
  353. $feed = Zend_Feed_Reader::importString(
  354. file_get_contents($this->_feedSamplePath.'/id/plain/none/rss093.xml')
  355. );
  356. $entry = $feed->current();
  357. $this->assertEquals(null, $entry->getId());
  358. }
  359. public function testGetsIdFromRss092_None()
  360. {
  361. $feed = Zend_Feed_Reader::importString(
  362. file_get_contents($this->_feedSamplePath.'/id/plain/none/rss092.xml')
  363. );
  364. $entry = $feed->current();
  365. $this->assertEquals(null, $entry->getId());
  366. }
  367. public function testGetsIdFromRss091_None()
  368. {
  369. $feed = Zend_Feed_Reader::importString(
  370. file_get_contents($this->_feedSamplePath.'/id/plain/none/rss091.xml')
  371. );
  372. $entry = $feed->current();
  373. $this->assertEquals(null, $entry->getId());
  374. }
  375. public function testGetsIdFromRss10_None()
  376. {
  377. $feed = Zend_Feed_Reader::importString(
  378. file_get_contents($this->_feedSamplePath.'/id/plain/none/rss10.xml')
  379. );
  380. $entry = $feed->current();
  381. $this->assertEquals(null, $entry->getId());
  382. }
  383. public function testGetsIdFromRss090_None()
  384. {
  385. $feed = Zend_Feed_Reader::importString(
  386. file_get_contents($this->_feedSamplePath.'/id/plain/none/rss090.xml')
  387. );
  388. $entry = $feed->current();
  389. $this->assertEquals(null, $entry->getId());
  390. }
  391. /**
  392. * Get Title (Unencoded Text)
  393. */
  394. public function testGetsTitleFromRss20()
  395. {
  396. $feed = Zend_Feed_Reader::importString(
  397. file_get_contents($this->_feedSamplePath.'/title/plain/rss20.xml')
  398. );
  399. $entry = $feed->current();
  400. $this->assertEquals('Entry Title', $entry->getTitle());
  401. }
  402. public function testGetsTitleFromRss094()
  403. {
  404. $feed = Zend_Feed_Reader::importString(
  405. file_get_contents($this->_feedSamplePath.'/title/plain/rss094.xml')
  406. );
  407. $entry = $feed->current();
  408. $this->assertEquals('Entry Title', $entry->getTitle());
  409. }
  410. public function testGetsTitleFromRss093()
  411. {
  412. $feed = Zend_Feed_Reader::importString(
  413. file_get_contents($this->_feedSamplePath.'/title/plain/rss093.xml')
  414. );
  415. $entry = $feed->current();
  416. $this->assertEquals('Entry Title', $entry->getTitle());
  417. }
  418. public function testGetsTitleFromRss092()
  419. {
  420. $feed = Zend_Feed_Reader::importString(
  421. file_get_contents($this->_feedSamplePath.'/title/plain/rss092.xml')
  422. );
  423. $entry = $feed->current();
  424. $this->assertEquals('Entry Title', $entry->getTitle());
  425. }
  426. public function testGetsTitleFromRss091()
  427. {
  428. $feed = Zend_Feed_Reader::importString(
  429. file_get_contents($this->_feedSamplePath.'/title/plain/rss091.xml')
  430. );
  431. $entry = $feed->current();
  432. $this->assertEquals('Entry Title', $entry->getTitle());
  433. }
  434. public function testGetsTitleFromRss10()
  435. {
  436. $feed = Zend_Feed_Reader::importString(
  437. file_get_contents($this->_feedSamplePath.'/title/plain/rss10.xml')
  438. );
  439. $entry = $feed->current();
  440. $this->assertEquals('Entry Title', $entry->getTitle());
  441. }
  442. public function testGetsTitleFromRss090()
  443. {
  444. $feed = Zend_Feed_Reader::importString(
  445. file_get_contents($this->_feedSamplePath.'/title/plain/rss090.xml')
  446. );
  447. $entry = $feed->current();
  448. $this->assertEquals('Entry Title', $entry->getTitle());
  449. }
  450. // DC 1.0
  451. public function testGetsTitleFromRss20_Dc10()
  452. {
  453. $feed = Zend_Feed_Reader::importString(
  454. file_get_contents($this->_feedSamplePath.'/title/plain/dc10/rss20.xml')
  455. );
  456. $entry = $feed->current();
  457. $this->assertEquals('Entry Title', $entry->getTitle());
  458. }
  459. public function testGetsTitleFromRss094_Dc10()
  460. {
  461. $feed = Zend_Feed_Reader::importString(
  462. file_get_contents($this->_feedSamplePath.'/title/plain/dc10/rss094.xml')
  463. );
  464. $entry = $feed->current();
  465. $this->assertEquals('Entry Title', $entry->getTitle());
  466. }
  467. public function testGetsTitleFromRss093_Dc10()
  468. {
  469. $feed = Zend_Feed_Reader::importString(
  470. file_get_contents($this->_feedSamplePath.'/title/plain/dc10/rss093.xml')
  471. );
  472. $entry = $feed->current();
  473. $this->assertEquals('Entry Title', $entry->getTitle());
  474. }
  475. public function testGetsTitleFromRss092_Dc10()
  476. {
  477. $feed = Zend_Feed_Reader::importString(
  478. file_get_contents($this->_feedSamplePath.'/title/plain/dc10/rss092.xml')
  479. );
  480. $entry = $feed->current();
  481. $this->assertEquals('Entry Title', $entry->getTitle());
  482. }
  483. public function testGetsTitleFromRss091_Dc10()
  484. {
  485. $feed = Zend_Feed_Reader::importString(
  486. file_get_contents($this->_feedSamplePath.'/title/plain/dc10/rss091.xml')
  487. );
  488. $entry = $feed->current();
  489. $this->assertEquals('Entry Title', $entry->getTitle());
  490. }
  491. public function testGetsTitleFromRss10_Dc10()
  492. {
  493. $feed = Zend_Feed_Reader::importString(
  494. file_get_contents($this->_feedSamplePath.'/title/plain/dc10/rss10.xml')
  495. );
  496. $entry = $feed->current();
  497. $this->assertEquals('Entry Title', $entry->getTitle());
  498. }
  499. public function testGetsTitleFromRss090_Dc10()
  500. {
  501. $feed = Zend_Feed_Reader::importString(
  502. file_get_contents($this->_feedSamplePath.'/title/plain/dc10/rss090.xml')
  503. );
  504. $entry = $feed->current();
  505. $this->assertEquals('Entry Title', $entry->getTitle());
  506. }
  507. // DC 1.1
  508. public function testGetsTitleFromRss20_Dc11()
  509. {
  510. $feed = Zend_Feed_Reader::importString(
  511. file_get_contents($this->_feedSamplePath.'/title/plain/dc11/rss20.xml')
  512. );
  513. $entry = $feed->current();
  514. $this->assertEquals('Entry Title', $entry->getTitle());
  515. }
  516. public function testGetsTitleFromRss094_Dc11()
  517. {
  518. $feed = Zend_Feed_Reader::importString(
  519. file_get_contents($this->_feedSamplePath.'/title/plain/dc11/rss094.xml')
  520. );
  521. $entry = $feed->current();
  522. $this->assertEquals('Entry Title', $entry->getTitle());
  523. }
  524. public function testGetsTitleFromRss093_Dc11()
  525. {
  526. $feed = Zend_Feed_Reader::importString(
  527. file_get_contents($this->_feedSamplePath.'/title/plain/dc11/rss093.xml')
  528. );
  529. $entry = $feed->current();
  530. $this->assertEquals('Entry Title', $entry->getTitle());
  531. }
  532. public function testGetsTitleFromRss092_Dc11()
  533. {
  534. $feed = Zend_Feed_Reader::importString(
  535. file_get_contents($this->_feedSamplePath.'/title/plain/dc11/rss092.xml')
  536. );
  537. $entry = $feed->current();
  538. $this->assertEquals('Entry Title', $entry->getTitle());
  539. }
  540. public function testGetsTitleFromRss091_Dc11()
  541. {
  542. $feed = Zend_Feed_Reader::importString(
  543. file_get_contents($this->_feedSamplePath.'/title/plain/dc11/rss091.xml')
  544. );
  545. $entry = $feed->current();
  546. $this->assertEquals('Entry Title', $entry->getTitle());
  547. }
  548. public function testGetsTitleFromRss10_Dc11()
  549. {
  550. $feed = Zend_Feed_Reader::importString(
  551. file_get_contents($this->_feedSamplePath.'/title/plain/dc11/rss10.xml')
  552. );
  553. $entry = $feed->current();
  554. $this->assertEquals('Entry Title', $entry->getTitle());
  555. }
  556. public function testGetsTitleFromRss090_Dc11()
  557. {
  558. $feed = Zend_Feed_Reader::importString(
  559. file_get_contents($this->_feedSamplePath.'/title/plain/dc11/rss090.xml')
  560. );
  561. $entry = $feed->current();
  562. $this->assertEquals('Entry Title', $entry->getTitle());
  563. }
  564. // Missing Title
  565. public function testGetsTitleFromRss20_None()
  566. {
  567. $feed = Zend_Feed_Reader::importString(
  568. file_get_contents($this->_feedSamplePath.'/title/plain/none/rss20.xml')
  569. );
  570. $entry = $feed->current();
  571. $this->assertEquals(null, $entry->getTitle());
  572. }
  573. public function testGetsTitleFromRss094_None()
  574. {
  575. $feed = Zend_Feed_Reader::importString(
  576. file_get_contents($this->_feedSamplePath.'/title/plain/none/rss094.xml')
  577. );
  578. $entry = $feed->current();
  579. $this->assertEquals(null, $entry->getTitle());
  580. }
  581. public function testGetsTitleFromRss093_None()
  582. {
  583. $feed = Zend_Feed_Reader::importString(
  584. file_get_contents($this->_feedSamplePath.'/title/plain/none/rss093.xml')
  585. );
  586. $entry = $feed->current();
  587. $this->assertEquals(null, $entry->getTitle());
  588. }
  589. public function testGetsTitleFromRss092_None()
  590. {
  591. $feed = Zend_Feed_Reader::importString(
  592. file_get_contents($this->_feedSamplePath.'/title/plain/none/rss092.xml')
  593. );
  594. $entry = $feed->current();
  595. $this->assertEquals(null, $entry->getTitle());
  596. }
  597. public function testGetsTitleFromRss091_None()
  598. {
  599. $feed = Zend_Feed_Reader::importString(
  600. file_get_contents($this->_feedSamplePath.'/title/plain/none/rss091.xml')
  601. );
  602. $entry = $feed->current();
  603. $this->assertEquals(null, $entry->getTitle());
  604. }
  605. public function testGetsTitleFromRss10_None()
  606. {
  607. $feed = Zend_Feed_Reader::importString(
  608. file_get_contents($this->_feedSamplePath.'/title/plain/none/rss10.xml')
  609. );
  610. $entry = $feed->current();
  611. $this->assertEquals(null, $entry->getTitle());
  612. }
  613. public function testGetsTitleFromRss090_None()
  614. {
  615. $feed = Zend_Feed_Reader::importString(
  616. file_get_contents($this->_feedSamplePath.'/title/plain/none/rss090.xml')
  617. );
  618. $entry = $feed->current();
  619. $this->assertEquals(null, $entry->getTitle());
  620. }
  621. /**
  622. * Get Authors (Unencoded Text)
  623. */
  624. public function testGetsAuthorsFromRss20()
  625. {
  626. $feed = Zend_Feed_Reader::importString(
  627. file_get_contents($this->_feedSamplePath.'/author/plain/rss20.xml')
  628. );
  629. $entry = $feed->current();
  630. $this->assertEquals(array(
  631. array('email'=>'joe@example.com','name'=>'Joe Bloggs'),
  632. array('email'=>'jane@example.com','name'=>'Jane Bloggs')
  633. ), (array) $entry->getAuthors());
  634. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $entry->getAuthors()->getValues());
  635. }
  636. public function testGetsAuthorsFromRss094()
  637. {
  638. $feed = Zend_Feed_Reader::importString(
  639. file_get_contents($this->_feedSamplePath.'/author/plain/rss094.xml')
  640. );
  641. $entry = $feed->current();
  642. $this->assertEquals(null, $entry->getAuthors());
  643. }
  644. public function testGetsAuthorsFromRss093()
  645. {
  646. $feed = Zend_Feed_Reader::importString(
  647. file_get_contents($this->_feedSamplePath.'/author/plain/rss093.xml')
  648. );
  649. $entry = $feed->current();
  650. $this->assertEquals(null, $entry->getAuthors());
  651. }
  652. public function testGetsAuthorsFromRss092()
  653. {
  654. $feed = Zend_Feed_Reader::importString(
  655. file_get_contents($this->_feedSamplePath.'/author/plain/rss092.xml')
  656. );
  657. $entry = $feed->current();
  658. $this->assertEquals(null, $entry->getAuthors());
  659. }
  660. public function testGetsAuthorsFromRss091()
  661. {
  662. $feed = Zend_Feed_Reader::importString(
  663. file_get_contents($this->_feedSamplePath.'/author/plain/rss091.xml')
  664. );
  665. $entry = $feed->current();
  666. $this->assertEquals(null, $entry->getAuthors());
  667. }
  668. public function testGetsAuthorsFromRss10()
  669. {
  670. $feed = Zend_Feed_Reader::importString(
  671. file_get_contents($this->_feedSamplePath.'/author/plain/rss10.xml')
  672. );
  673. $entry = $feed->current();
  674. $this->assertEquals(null, $entry->getAuthors());
  675. }
  676. public function testGetsAuthorsFromRss090()
  677. {
  678. $feed = Zend_Feed_Reader::importString(
  679. file_get_contents($this->_feedSamplePath.'/author/plain/rss090.xml')
  680. );
  681. $entry = $feed->current();
  682. $this->assertEquals(null, $entry->getAuthors());
  683. }
  684. // DC 1.0
  685. public function testGetsAuthorsFromRss20_Dc10()
  686. {
  687. $feed = Zend_Feed_Reader::importString(
  688. file_get_contents($this->_feedSamplePath.'/author/plain/dc10/rss20.xml')
  689. );
  690. $entry = $feed->current();
  691. $this->assertEquals(array(
  692. array('name'=>'Joe Bloggs'), array('name'=>'Jane Bloggs')
  693. ), (array) $entry->getAuthors());
  694. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $entry->getAuthors()->getValues());
  695. }
  696. public function testGetsAuthorsFromRss094_Dc10()
  697. {
  698. $feed = Zend_Feed_Reader::importString(
  699. file_get_contents($this->_feedSamplePath.'/author/plain/dc10/rss094.xml')
  700. );
  701. $entry = $feed->current();
  702. $this->assertEquals(array(
  703. array('name'=>'Joe Bloggs'), array('name'=>'Jane Bloggs')
  704. ), (array) $entry->getAuthors());
  705. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $entry->getAuthors()->getValues());
  706. }
  707. public function testGetsAuthorsFromRss093_Dc10()
  708. {
  709. $feed = Zend_Feed_Reader::importString(
  710. file_get_contents($this->_feedSamplePath.'/author/plain/dc10/rss093.xml')
  711. );
  712. $entry = $feed->current();
  713. $this->assertEquals(array(
  714. array('name'=>'Joe Bloggs'), array('name'=>'Jane Bloggs')
  715. ), (array) $entry->getAuthors());
  716. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $entry->getAuthors()->getValues());
  717. }
  718. public function testGetsAuthorsFromRss092_Dc10()
  719. {
  720. $feed = Zend_Feed_Reader::importString(
  721. file_get_contents($this->_feedSamplePath.'/author/plain/dc10/rss092.xml')
  722. );
  723. $entry = $feed->current();
  724. $this->assertEquals(array(
  725. array('name'=>'Joe Bloggs'), array('name'=>'Jane Bloggs')
  726. ), (array) $entry->getAuthors());
  727. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $entry->getAuthors()->getValues());
  728. }
  729. public function testGetsAuthorsFromRss091_Dc10()
  730. {
  731. $feed = Zend_Feed_Reader::importString(
  732. file_get_contents($this->_feedSamplePath.'/author/plain/dc10/rss091.xml')
  733. );
  734. $entry = $feed->current();
  735. $this->assertEquals(array(
  736. array('name'=>'Joe Bloggs'), array('name'=>'Jane Bloggs')
  737. ), (array) $entry->getAuthors());
  738. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $entry->getAuthors()->getValues());
  739. }
  740. public function testGetsAuthorsFromRss10_Dc10()
  741. {
  742. $feed = Zend_Feed_Reader::importString(
  743. file_get_contents($this->_feedSamplePath.'/author/plain/dc10/rss10.xml')
  744. );
  745. $entry = $feed->current();
  746. $this->assertEquals(array(
  747. array('name'=>'Joe Bloggs'), array('name'=>'Jane Bloggs')
  748. ), (array) $entry->getAuthors());
  749. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $entry->getAuthors()->getValues());
  750. }
  751. public function testGetsAuthorsFromRss090_Dc10()
  752. {
  753. $feed = Zend_Feed_Reader::importString(
  754. file_get_contents($this->_feedSamplePath.'/author/plain/dc10/rss090.xml')
  755. );
  756. $entry = $feed->current();
  757. $this->assertEquals(array(
  758. array('name'=>'Joe Bloggs'), array('name'=>'Jane Bloggs')
  759. ), (array) $entry->getAuthors());
  760. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $entry->getAuthors()->getValues());
  761. }
  762. // DC 1.1
  763. public function testGetsAuthorsFromRss20_Dc11()
  764. {
  765. $feed = Zend_Feed_Reader::importString(
  766. file_get_contents($this->_feedSamplePath.'/author/plain/dc11/rss20.xml')
  767. );
  768. $entry = $feed->current();
  769. $this->assertEquals(array(
  770. array('name'=>'Joe Bloggs'), array('name'=>'Jane Bloggs')
  771. ), (array) $entry->getAuthors());
  772. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $entry->getAuthors()->getValues());
  773. }
  774. public function testGetsAuthorsFromRss094_Dc11()
  775. {
  776. $feed = Zend_Feed_Reader::importString(
  777. file_get_contents($this->_feedSamplePath.'/author/plain/dc11/rss094.xml')
  778. );
  779. $entry = $feed->current();
  780. $this->assertEquals(array(
  781. array('name'=>'Joe Bloggs'), array('name'=>'Jane Bloggs')
  782. ), (array) $entry->getAuthors());
  783. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $entry->getAuthors()->getValues());
  784. }
  785. public function testGetsAuthorsFromRss093_Dc11()
  786. {
  787. $feed = Zend_Feed_Reader::importString(
  788. file_get_contents($this->_feedSamplePath.'/author/plain/dc11/rss093.xml')
  789. );
  790. $entry = $feed->current();
  791. $this->assertEquals(array(
  792. array('name'=>'Joe Bloggs'), array('name'=>'Jane Bloggs')
  793. ), (array) $entry->getAuthors());
  794. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $entry->getAuthors()->getValues());
  795. }
  796. public function testGetsAuthorsFromRss092_Dc11()
  797. {
  798. $feed = Zend_Feed_Reader::importString(
  799. file_get_contents($this->_feedSamplePath.'/author/plain/dc11/rss092.xml')
  800. );
  801. $entry = $feed->current();
  802. $this->assertEquals(array(
  803. array('name'=>'Joe Bloggs'), array('name'=>'Jane Bloggs')
  804. ), (array) $entry->getAuthors());
  805. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $entry->getAuthors()->getValues());
  806. }
  807. public function testGetsAuthorsFromRss091_Dc11()
  808. {
  809. $feed = Zend_Feed_Reader::importString(
  810. file_get_contents($this->_feedSamplePath.'/author/plain/dc11/rss091.xml')
  811. );
  812. $entry = $feed->current();
  813. $this->assertEquals(array(
  814. array('name'=>'Joe Bloggs'), array('name'=>'Jane Bloggs')
  815. ), (array) $entry->getAuthors());
  816. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $entry->getAuthors()->getValues());
  817. }
  818. public function testGetsAuthorsFromRss10_Dc11()
  819. {
  820. $feed = Zend_Feed_Reader::importString(
  821. file_get_contents($this->_feedSamplePath.'/author/plain/dc11/rss10.xml')
  822. );
  823. $entry = $feed->current();
  824. $this->assertEquals(array(
  825. array('name'=>'Joe Bloggs'), array('name'=>'Jane Bloggs')
  826. ), (array) $entry->getAuthors());
  827. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $entry->getAuthors()->getValues());
  828. }
  829. public function testGetsAuthorsFromRss090_Dc11()
  830. {
  831. $feed = Zend_Feed_Reader::importString(
  832. file_get_contents($this->_feedSamplePath.'/author/plain/dc11/rss090.xml')
  833. );
  834. $entry = $feed->current();
  835. $this->assertEquals(array(
  836. array('name'=>'Joe Bloggs'), array('name'=>'Jane Bloggs')
  837. ), (array) $entry->getAuthors());
  838. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $entry->getAuthors()->getValues());
  839. }
  840. // Missing Author
  841. public function testGetsAuthorsFromRss20_None()
  842. {
  843. $feed = Zend_Feed_Reader::importString(
  844. file_get_contents($this->_feedSamplePath.'/author/plain/none/rss20.xml')
  845. );
  846. $entry = $feed->current();
  847. $this->assertEquals(null, $entry->getAuthors());
  848. }
  849. public function testGetsAuthorsFromRss094_None()
  850. {
  851. $feed = Zend_Feed_Reader::importString(
  852. file_get_contents($this->_feedSamplePath.'/author/plain/none/rss094.xml')
  853. );
  854. $entry = $feed->current();
  855. $this->assertEquals(null, $entry->getAuthors());
  856. }
  857. public function testGetsAuthorsFromRss093_None()
  858. {
  859. $feed = Zend_Feed_Reader::importString(
  860. file_get_contents($this->_feedSamplePath.'/author/plain/none/rss093.xml')
  861. );
  862. $entry = $feed->current();
  863. $this->assertEquals(null, $entry->getAuthors());
  864. }
  865. public function testGetsAuthorsFromRss092_None()
  866. {
  867. $feed = Zend_Feed_Reader::importString(
  868. file_get_contents($this->_feedSamplePath.'/author/plain/none/rss092.xml')
  869. );
  870. $entry = $feed->current();
  871. $this->assertEquals(null, $entry->getAuthors());
  872. }
  873. public function testGetsAuthorsFromRss091_None()
  874. {
  875. $feed = Zend_Feed_Reader::importString(
  876. file_get_contents($this->_feedSamplePath.'/author/plain/none/rss091.xml')
  877. );
  878. $entry = $feed->current();
  879. $this->assertEquals(null, $entry->getAuthors());
  880. }
  881. public function testGetsAuthorsFromRss10_None()
  882. {
  883. $feed = Zend_Feed_Reader::importString(
  884. file_get_contents($this->_feedSamplePath.'/author/plain/none/rss10.xml')
  885. );
  886. $entry = $feed->current();
  887. $this->assertEquals(null, $entry->getAuthors());
  888. }
  889. public function testGetsAuthorsFromRss090_None()
  890. {
  891. $feed = Zend_Feed_Reader::importString(
  892. file_get_contents($this->_feedSamplePath.'/author/plain/none/rss090.xml')
  893. );
  894. $entry = $feed->current();
  895. $this->assertEquals(null, $entry->getAuthors());
  896. }
  897. /**
  898. * Get Author (Unencoded Text)
  899. */
  900. public function testGetsAuthorFromRss20()
  901. {
  902. $feed = Zend_Feed_Reader::importString(
  903. file_get_contents($this->_feedSamplePath.'/author/plain/rss20.xml')
  904. );
  905. $entry = $feed->current();
  906. $this->assertEquals(array('name'=>'Joe Bloggs','email'=>'joe@example.com'), $entry->getAuthor());
  907. }
  908. public function testGetsAuthorFromRss094()
  909. {
  910. $feed = Zend_Feed_Reader::importString(
  911. file_get_contents($this->_feedSamplePath.'/author/plain/rss094.xml')
  912. );
  913. $entry = $feed->current();
  914. $this->assertEquals(null, $entry->getAuthor());
  915. }
  916. public function testGetsAuthorFromRss093()
  917. {
  918. $feed = Zend_Feed_Reader::importString(
  919. file_get_contents($this->_feedSamplePath.'/author/plain/rss093.xml')
  920. );
  921. $entry = $feed->current();
  922. $this->assertEquals(null, $entry->getAuthor());
  923. }
  924. public function testGetsAuthorFromRss092()
  925. {
  926. $feed = Zend_Feed_Reader::importString(
  927. file_get_contents($this->_feedSamplePath.'/author/plain/rss092.xml')
  928. );
  929. $entry = $feed->current();
  930. $this->assertEquals(null, $entry->getAuthor());
  931. }
  932. public function testGetsAuthorFromRss091()
  933. {
  934. $feed = Zend_Feed_Reader::importString(
  935. file_get_contents($this->_feedSamplePath.'/author/plain/rss091.xml')
  936. );
  937. $entry = $feed->current();
  938. $this->assertEquals(null, $entry->getAuthor());
  939. }
  940. public function testGetsAuthorFromRss10()
  941. {
  942. $feed = Zend_Feed_Reader::importString(
  943. file_get_contents($this->_feedSamplePath.'/author/plain/rss10.xml')
  944. );
  945. $entry = $feed->current();
  946. $this->assertEquals(null, $entry->getAuthor());
  947. }
  948. public function testGetsAuthorFromRss090()
  949. {
  950. $feed = Zend_Feed_Reader::importString(
  951. file_get_contents($this->_feedSamplePath.'/author/plain/rss090.xml')
  952. );
  953. $entry = $feed->current();
  954. $this->assertEquals(null, $entry->getAuthor());
  955. }
  956. // DC 1.0
  957. public function testGetsAuthorFromRss20_Dc10()
  958. {
  959. $feed = Zend_Feed_Reader::importString(
  960. file_get_contents($this->_feedSamplePath.'/author/plain/dc10/rss20.xml')
  961. );
  962. $entry = $feed->current();
  963. $this->assertEquals(array('name'=>'Joe Bloggs'), $entry->getAuthor());
  964. }
  965. public function testGetsAuthorFromRss094_Dc10()
  966. {
  967. $feed = Zend_Feed_Reader::importString(
  968. file_get_contents($this->_feedSamplePath.'/author/plain/dc10/rss094.xml')
  969. );
  970. $entry = $feed->current();
  971. $this->assertEquals(array('name'=>'Jane Bloggs'), $entry->getAuthor(1));
  972. }
  973. public function testGetsAuthorFromRss093_Dc10()
  974. {
  975. $feed = Zend_Feed_Reader::importString(
  976. file_get_contents($this->_feedSamplePath.'/author/plain/dc10/rss093.xml')
  977. );
  978. $entry = $feed->current();
  979. $this->assertEquals(array('name'=>'Joe Bloggs'), $entry->getAuthor());
  980. }
  981. public function testGetsAuthorFromRss092_Dc10()
  982. {
  983. $feed = Zend_Feed_Reader::importString(
  984. file_get_contents($this->_feedSamplePath.'/author/plain/dc10/rss092.xml')
  985. );
  986. $entry = $feed->current();
  987. $this->assertEquals(array('name'=>'Jane Bloggs'), $entry->getAuthor(1));
  988. }
  989. public function testGetsAuthorFromRss091_Dc10()
  990. {
  991. $feed = Zend_Feed_Reader::importString(
  992. file_get_contents($this->_feedSamplePath.'/author/plain/dc10/rss091.xml')
  993. );
  994. $entry = $feed->current();
  995. $this->assertEquals(array('name'=>'Joe Bloggs'), $entry->getAuthor());
  996. }
  997. public function testGetsAuthorFromRss10_Dc10()
  998. {
  999. $feed = Zend_Feed_Reader::importString(
  1000. file_get_contents($this->_feedSamplePath.'/author/plain/dc10/rss10.xml')
  1001. );
  1002. $entry = $feed->current();
  1003. $this->assertEquals(array('name'=>'Jane Bloggs'), $entry->getAuthor(1));
  1004. }
  1005. public function testGetsAuthorFromRss090_Dc10()
  1006. {
  1007. $feed = Zend_Feed_Reader::importString(
  1008. file_get_contents($this->_feedSamplePath.'/author/plain/dc10/rss090.xml')
  1009. );
  1010. $entry = $feed->current();
  1011. $this->assertEquals(array('name'=>'Joe Bloggs'), $entry->getAuthor());
  1012. }
  1013. // DC 1.1
  1014. public function testGetsAuthorFromRss20_Dc11()
  1015. {
  1016. $feed = Zend_Feed_Reader::importString(
  1017. file_get_contents($this->_feedSamplePath.'/author/plain/dc11/rss20.xml')
  1018. );
  1019. $entry = $feed->current();
  1020. $this->assertEquals(array('name'=>'Jane Bloggs'), $entry->getAuthor(1));
  1021. }
  1022. public function testGetsAuthorFromRss094_Dc11()
  1023. {
  1024. $feed = Zend_Feed_Reader::importString(
  1025. file_get_contents($this->_feedSamplePath.'/author/plain/dc11/rss094.xml')
  1026. );
  1027. $entry = $feed->current();
  1028. $this->assertEquals(array('name'=>'Joe Bloggs'), $entry->getAuthor());
  1029. }
  1030. public function testGetsAuthorFromRss093_Dc11()
  1031. {
  1032. $feed = Zend_Feed_Reader::importString(
  1033. file_get_contents($this->_feedSamplePath.'/author/plain/dc11/rss093.xml')
  1034. );
  1035. $entry = $feed->current();
  1036. $this->assertEquals(array('name'=>'Jane Bloggs'), $entry->getAuthor(1));
  1037. }
  1038. public function testGetsAuthorFromRss092_Dc11()
  1039. {
  1040. $feed = Zend_Feed_Reader::importString(
  1041. file_get_contents($this->_feedSamplePath.'/author/plain/dc11/rss092.xml')
  1042. );
  1043. $entry = $feed->current();
  1044. $this->assertEquals(array('name'=>'Joe Bloggs'), $entry->getAuthor());
  1045. }
  1046. public function testGetsAuthorFromRss091_Dc11()
  1047. {
  1048. $feed = Zend_Feed_Reader::importString(
  1049. file_get_contents($this->_feedSamplePath.'/author/plain/dc11/rss091.xml')
  1050. );
  1051. $entry = $feed->current();
  1052. $this->assertEquals(array('name'=>'Jane Bloggs'), $entry->getAuthor(1));
  1053. }
  1054. public function testGetsAuthorFromRss10_Dc11()
  1055. {
  1056. $feed = Zend_Feed_Reader::importString(
  1057. file_get_contents($this->_feedSamplePath.'/author/plain/dc11/rss10.xml')
  1058. );
  1059. $entry = $feed->current();
  1060. $this->assertEquals(array('name'=>'Joe Bloggs'), $entry->getAuthor());
  1061. }
  1062. public function testGetsAuthorFromRss090_Dc11()
  1063. {
  1064. $feed = Zend_Feed_Reader::importString(
  1065. file_get_contents($this->_feedSamplePath.'/author/plain/dc11/rss090.xml')
  1066. );
  1067. $entry = $feed->current();
  1068. $this->assertEquals(array('name'=>'Jane Bloggs'), $entry->getAuthor(1));
  1069. }
  1070. // Missing Id
  1071. public function testGetsAuthorFromRss20_None()
  1072. {
  1073. $feed = Zend_Feed_Reader::importString(
  1074. file_get_contents($this->_feedSamplePath.'/author/plain/none/rss20.xml')
  1075. );
  1076. $entry = $feed->current();
  1077. $this->assertEquals(null, $entry->getAuthor());
  1078. }
  1079. public function testGetsAuthorFromRss094_None()
  1080. {
  1081. $feed = Zend_Feed_Reader::importString(
  1082. file_get_contents($this->_feedSamplePath.'/author/plain/none/rss094.xml')
  1083. );
  1084. $entry = $feed->current();
  1085. $this->assertEquals(null, $entry->getAuthor());
  1086. }
  1087. public function testGetsAuthorFromRss093_None()
  1088. {
  1089. $feed = Zend_Feed_Reader::importString(
  1090. file_get_contents($this->_feedSamplePath.'/author/plain/none/rss093.xml')
  1091. );
  1092. $entry = $feed->current();
  1093. $this->assertEquals(null, $entry->getAuthor());
  1094. }
  1095. public function testGetsAuthorFromRss092_None()
  1096. {
  1097. $feed = Zend_Feed_Reader::importString(
  1098. file_get_contents($this->_feedSamplePath.'/author/plain/none/rss092.xml')
  1099. );
  1100. $entry = $feed->current();
  1101. $this->assertEquals(null, $entry->getAuthor());
  1102. }
  1103. public function testGetsAuthorFromRss091_None()
  1104. {
  1105. $feed = Zend_Feed_Reader::importString(
  1106. file_get_contents($this->_feedSamplePath.'/author/plain/none/rss091.xml')
  1107. );
  1108. $entry = $feed->current();
  1109. $this->assertEquals(null, $entry->getAuthor());
  1110. }
  1111. public function testGetsAuthorFromRss10_None()
  1112. {
  1113. $feed = Zend_Feed_Reader::importString(
  1114. file_get_contents($this->_feedSamplePath.'/author/plain/none/rss10.xml')
  1115. );
  1116. $entry = $feed->current();
  1117. $this->assertEquals(null, $entry->getAuthor());
  1118. }
  1119. public function testGetsAuthorFromRss090_None()
  1120. {
  1121. $feed = Zend_Feed_Reader::importString(
  1122. file_get_contents($this->_feedSamplePath.'/author/plain/none/rss090.xml')
  1123. );
  1124. $entry = $feed->current();
  1125. $this->assertEquals(null, $entry->getAuthor());
  1126. }
  1127. /**
  1128. * Get Description (Unencoded Text)
  1129. */
  1130. public function testGetsDescriptionFromRss20()
  1131. {
  1132. $feed = Zend_Feed_Reader::importString(
  1133. file_get_contents($this->_feedSamplePath.'/description/plain/rss20.xml')
  1134. );
  1135. $entry = $feed->current();
  1136. $this->assertEquals('Entry Description', $entry->getDescription());
  1137. }
  1138. public function testGetsDescriptionFromRss094()
  1139. {
  1140. $feed = Zend_Feed_Reader::importString(
  1141. file_get_contents($this->_feedSamplePath.'/description/plain/rss094.xml')
  1142. );
  1143. $entry = $feed->current();
  1144. $this->assertEquals('Entry Description', $entry->getDescription());
  1145. }
  1146. public function testGetsDescriptionFromRss093()
  1147. {
  1148. $feed = Zend_Feed_Reader::importString(
  1149. file_get_contents($this->_feedSamplePath.'/description/plain/rss093.xml')
  1150. );
  1151. $entry = $feed->current();
  1152. $this->assertEquals('Entry Description', $entry->getDescription());
  1153. }
  1154. public function testGetsDescriptionFromRss092()
  1155. {
  1156. $feed = Zend_Feed_Reader::importString(
  1157. file_get_contents($this->_feedSamplePath.'/description/plain/rss092.xml')
  1158. );
  1159. $entry = $feed->current();
  1160. $this->assertEquals('Entry Description', $entry->getDescription());
  1161. }
  1162. public function testGetsDescriptionFromRss091()
  1163. {
  1164. $feed = Zend_Feed_Reader::importString(
  1165. file_get_contents($this->_feedSamplePath.'/description/plain/rss091.xml')
  1166. );
  1167. $entry = $feed->current();
  1168. $this->assertEquals('Entry Description', $entry->getDescription());
  1169. }
  1170. public function testGetsDescriptionFromRss10()
  1171. {
  1172. $feed = Zend_Feed_Reader::importString(
  1173. file_get_contents($this->_feedSamplePath.'/description/plain/rss10.xml')
  1174. );
  1175. $entry = $feed->current();
  1176. $this->assertEquals('Entry Description', $entry->getDescription());
  1177. }
  1178. public function testGetsDescriptionFromRss090()
  1179. {
  1180. $feed = Zend_Feed_Reader::importString(
  1181. file_get_contents($this->_feedSamplePath.'/description/plain/rss090.xml')
  1182. );
  1183. $entry = $feed->current();
  1184. $this->assertEquals('Entry Description', $entry->getDescription());
  1185. }
  1186. // DC 1.0
  1187. public function testGetsDescriptionFromRss20_Dc10()
  1188. {
  1189. $feed = Zend_Feed_Reader::importString(
  1190. file_get_contents($this->_feedSamplePath.'/description/plain/dc10/rss20.xml')
  1191. );
  1192. $entry = $feed->current();
  1193. $this->assertEquals('Entry Description', $entry->getDescription());
  1194. }
  1195. public function testGetsDescriptionFromRss094_Dc10()
  1196. {
  1197. $feed = Zend_Feed_Reader::importString(
  1198. file_get_contents($this->_feedSamplePath.'/description/plain/dc10/rss094.xml')
  1199. );
  1200. $entry = $feed->current();
  1201. $this->assertEquals('Entry Description', $entry->getDescription());
  1202. }
  1203. public function testGetsDescriptionFromRss093_Dc10()
  1204. {
  1205. $feed = Zend_Feed_Reader::importString(
  1206. file_get_contents($this->_feedSamplePath.'/description/plain/dc10/rss093.xml')
  1207. );
  1208. $entry = $feed->current();
  1209. $this->assertEquals('Entry Description', $entry->getDescription());
  1210. }
  1211. public function testGetsDescriptionFromRss092_Dc10()
  1212. {
  1213. $feed = Zend_Feed_Reader::importString(
  1214. file_get_contents($this->_feedSamplePath.'/description/plain/dc10/rss092.xml')
  1215. );
  1216. $entry = $feed->current();
  1217. $this->assertEquals('Entry Description', $entry->getDescription());
  1218. }
  1219. public function testGetsDescriptionFromRss091_Dc10()
  1220. {
  1221. $feed = Zend_Feed_Reader::importString(
  1222. file_get_contents($this->_feedSamplePath.'/description/plain/dc10/rss091.xml')
  1223. );
  1224. $entry = $feed->current();
  1225. $this->assertEquals('Entry Description', $entry->getDescription());
  1226. }
  1227. public function testGetsDescriptionFromRss10_Dc10()
  1228. {
  1229. $feed = Zend_Feed_Reader::importString(
  1230. file_get_contents($this->_feedSamplePath.'/description/plain/dc10/rss10.xml')
  1231. );
  1232. $entry = $feed->current();
  1233. $this->assertEquals('Entry Description', $entry->getDescription());
  1234. }
  1235. public function testGetsDescriptionFromRss090_Dc10()
  1236. {
  1237. $feed = Zend_Feed_Reader::importString(
  1238. file_get_contents($this->_feedSamplePath.'/description/plain/dc10/rss090.xml')
  1239. );
  1240. $entry = $feed->current();
  1241. $this->assertEquals('Entry Description', $entry->getDescription());
  1242. }
  1243. // DC 1.1
  1244. public function testGetsDescriptionFromRss20_Dc11()
  1245. {
  1246. $feed = Zend_Feed_Reader::importString(
  1247. file_get_contents($this->_feedSamplePath.'/description/plain/dc11/rss20.xml')
  1248. );
  1249. $entry = $feed->current();
  1250. $this->assertEquals('Entry Description', $entry->getDescription());
  1251. }
  1252. public function testGetsDescriptionFromRss094_Dc11()
  1253. {
  1254. $feed = Zend_Feed_Reader::importString(
  1255. file_get_contents($this->_feedSamplePath.'/description/plain/dc11/rss094.xml')
  1256. );
  1257. $entry = $feed->current();
  1258. $this->assertEquals('Entry Description', $entry->getDescription());
  1259. }
  1260. public function testGetsDescriptionFromRss093_Dc11()
  1261. {
  1262. $feed = Zend_Feed_Reader::importString(
  1263. file_get_contents($this->_feedSamplePath.'/description/plain/dc11/rss093.xml')
  1264. );
  1265. $entry = $feed->current();
  1266. $this->assertEquals('Entry Description', $entry->getDescription());
  1267. }
  1268. public function testGetsDescriptionFromRss092_Dc11()
  1269. {
  1270. $feed = Zend_Feed_Reader::importString(
  1271. file_get_contents($this->_feedSamplePath.'/description/plain/dc11/rss092.xml')
  1272. );
  1273. $entry = $feed->current();
  1274. $this->assertEquals('Entry Description', $entry->getDescription());
  1275. }
  1276. public function testGetsDescriptionFromRss091_Dc11()
  1277. {
  1278. $feed = Zend_Feed_Reader::importString(
  1279. file_get_contents($this->_feedSamplePath.'/description/plain/dc11/rss091.xml')
  1280. );
  1281. $entry = $feed->current();
  1282. $this->assertEquals('Entry Description', $entry->getDescription());
  1283. }
  1284. public function testGetsDescriptionFromRss10_Dc11()
  1285. {
  1286. $feed = Zend_Feed_Reader::importString(
  1287. file_get_contents($this->_feedSamplePath.'/description/plain/dc11/rss10.xml')
  1288. );
  1289. $entry = $feed->current();
  1290. $this->assertEquals('Entry Description', $entry->getDescription());
  1291. }
  1292. public function testGetsDescriptionFromRss090_Dc11()
  1293. {
  1294. $feed = Zend_Feed_Reader::importString(
  1295. file_get_contents($this->_feedSamplePath.'/description/plain/dc11/rss090.xml')
  1296. );
  1297. $entry = $feed->current();
  1298. $this->assertEquals('Entry Description', $entry->getDescription());
  1299. }
  1300. // Missing Description
  1301. public function testGetsDescriptionFromRss20_None()
  1302. {
  1303. $feed = Zend_Feed_Reader::importString(
  1304. file_get_contents($this->_feedSamplePath.'/description/plain/none/rss20.xml')
  1305. )

Large files files are truncated, but you can click here to view the full file