PageRenderTime 67ms CodeModel.GetById 21ms RepoModel.GetById 1ms app.codeStats 0ms

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

https://github.com/damoon/zf
PHP | 2766 lines | 2324 code | 340 blank | 102 comment | 2 complexity | a5f7726d2b3afc8257cef0f62ab35336 MD5 | raw 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-2010 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. require_once 'Zend/Registry.php';
  25. /**
  26. * @category Zend
  27. * @package Zend_Feed
  28. * @subpackage UnitTests
  29. * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
  30. * @license http://framework.zend.com/license/new-bsd New BSD License
  31. * @group Zend_Feed
  32. * @group Zend_Feed_Reader
  33. */
  34. class Zend_Feed_Reader_Feed_RssTest extends PHPUnit_Framework_TestCase
  35. {
  36. protected $_feedSamplePath = null;
  37. protected $_expectedCats = array();
  38. protected $_expectedCatsRdf = array();
  39. protected $_expectedCatsAtom = array();
  40. public function setup()
  41. {
  42. Zend_Feed_Reader::reset();
  43. if (Zend_Registry::isRegistered('Zend_Locale')) {
  44. $registry = Zend_Registry::getInstance();
  45. unset($registry['Zend_Locale']);
  46. }
  47. $this->_feedSamplePath = dirname(__FILE__) . '/_files/Rss';
  48. $this->_options = Zend_Date::setOptions();
  49. foreach($this->_options as $k=>$v) {
  50. if (is_null($v)) {
  51. unset($this->_options[$k]);
  52. }
  53. }
  54. Zend_Date::setOptions(array('format_type'=>'iso'));
  55. $this->_expectedCats = array(
  56. array(
  57. 'term' => 'topic1',
  58. 'scheme' => 'http://example.com/schema1',
  59. 'label' => 'topic1'
  60. ),
  61. array(
  62. 'term' => 'topic1',
  63. 'scheme' => 'http://example.com/schema2',
  64. 'label' => 'topic1'
  65. ),
  66. array(
  67. 'term' => 'topic2',
  68. 'scheme' => 'http://example.com/schema1',
  69. 'label' => 'topic2'
  70. )
  71. );
  72. $this->_expectedCatsRdf = array(
  73. array(
  74. 'term' => 'topic1',
  75. 'scheme' => null,
  76. 'label' => 'topic1'
  77. ),
  78. array(
  79. 'term' => 'topic2',
  80. 'scheme' => null,
  81. 'label' => 'topic2'
  82. )
  83. );
  84. $this->_expectedCatsAtom = array(
  85. array(
  86. 'term' => 'topic1',
  87. 'scheme' => 'http://example.com/schema1',
  88. 'label' => 'topic1'
  89. ),
  90. array(
  91. 'term' => 'topic1',
  92. 'scheme' => 'http://example.com/schema2',
  93. 'label' => 'topic1'
  94. ),
  95. array(
  96. 'term' => 'cat_dog',
  97. 'scheme' => 'http://example.com/schema1',
  98. 'label' => 'Cat & Dog'
  99. )
  100. );
  101. }
  102. public function teardown()
  103. {
  104. Zend_Date::setOptions($this->_options);
  105. }
  106. /**
  107. * Get Title (Unencoded Text)
  108. */
  109. public function testGetsTitleFromRss20()
  110. {
  111. $feed = Zend_Feed_Reader::importString(
  112. file_get_contents($this->_feedSamplePath.'/title/plain/rss20.xml')
  113. );
  114. $this->assertEquals('My Title', $feed->getTitle());
  115. }
  116. public function testGetsTitleFromRss094()
  117. {
  118. $feed = Zend_Feed_Reader::importString(
  119. file_get_contents($this->_feedSamplePath.'/title/plain/rss094.xml')
  120. );
  121. $this->assertEquals('My Title', $feed->getTitle());
  122. }
  123. public function testGetsTitleFromRss093()
  124. {
  125. $feed = Zend_Feed_Reader::importString(
  126. file_get_contents($this->_feedSamplePath.'/title/plain/rss093.xml')
  127. );
  128. $this->assertEquals('My Title', $feed->getTitle());
  129. }
  130. public function testGetsTitleFromRss092()
  131. {
  132. $feed = Zend_Feed_Reader::importString(
  133. file_get_contents($this->_feedSamplePath.'/title/plain/rss092.xml')
  134. );
  135. $this->assertEquals('My Title', $feed->getTitle());
  136. }
  137. public function testGetsTitleFromRss091()
  138. {
  139. $feed = Zend_Feed_Reader::importString(
  140. file_get_contents($this->_feedSamplePath.'/title/plain/rss091.xml')
  141. );
  142. $this->assertEquals('My Title', $feed->getTitle());
  143. }
  144. public function testGetsTitleFromRss10()
  145. {
  146. $feed = Zend_Feed_Reader::importString(
  147. file_get_contents($this->_feedSamplePath.'/title/plain/rss10.xml')
  148. );
  149. $this->assertEquals('My Title', $feed->getTitle());
  150. }
  151. public function testGetsTitleFromRss090()
  152. {
  153. $feed = Zend_Feed_Reader::importString(
  154. file_get_contents($this->_feedSamplePath.'/title/plain/rss090.xml')
  155. );
  156. $this->assertEquals('My Title', $feed->getTitle());
  157. }
  158. // DC 1.0
  159. public function testGetsTitleFromRss20_Dc10()
  160. {
  161. $feed = Zend_Feed_Reader::importString(
  162. file_get_contents($this->_feedSamplePath.'/title/plain/dc10/rss20.xml')
  163. );
  164. $this->assertEquals('My Title', $feed->getTitle());
  165. }
  166. public function testGetsTitleFromRss094_Dc10()
  167. {
  168. $feed = Zend_Feed_Reader::importString(
  169. file_get_contents($this->_feedSamplePath.'/title/plain/dc10/rss094.xml')
  170. );
  171. $this->assertEquals('My Title', $feed->getTitle());
  172. }
  173. public function testGetsTitleFromRss093_Dc10()
  174. {
  175. $feed = Zend_Feed_Reader::importString(
  176. file_get_contents($this->_feedSamplePath.'/title/plain/dc10/rss093.xml')
  177. );
  178. $this->assertEquals('My Title', $feed->getTitle());
  179. }
  180. public function testGetsTitleFromRss092_Dc10()
  181. {
  182. $feed = Zend_Feed_Reader::importString(
  183. file_get_contents($this->_feedSamplePath.'/title/plain/dc10/rss092.xml')
  184. );
  185. $this->assertEquals('My Title', $feed->getTitle());
  186. }
  187. public function testGetsTitleFromRss091_Dc10()
  188. {
  189. $feed = Zend_Feed_Reader::importString(
  190. file_get_contents($this->_feedSamplePath.'/title/plain/dc10/rss091.xml')
  191. );
  192. $this->assertEquals('My Title', $feed->getTitle());
  193. }
  194. public function testGetsTitleFromRss10_Dc10()
  195. {
  196. $feed = Zend_Feed_Reader::importString(
  197. file_get_contents($this->_feedSamplePath.'/title/plain/dc10/rss10.xml')
  198. );
  199. $this->assertEquals('My Title', $feed->getTitle());
  200. }
  201. public function testGetsTitleFromRss090_Dc10()
  202. {
  203. $feed = Zend_Feed_Reader::importString(
  204. file_get_contents($this->_feedSamplePath.'/title/plain/dc10/rss090.xml')
  205. );
  206. $this->assertEquals('My Title', $feed->getTitle());
  207. }
  208. // DC 1.1
  209. public function testGetsTitleFromRss20_Dc11()
  210. {
  211. $feed = Zend_Feed_Reader::importString(
  212. file_get_contents($this->_feedSamplePath.'/title/plain/dc11/rss20.xml')
  213. );
  214. $this->assertEquals('My Title', $feed->getTitle());
  215. }
  216. public function testGetsTitleFromRss094_Dc11()
  217. {
  218. $feed = Zend_Feed_Reader::importString(
  219. file_get_contents($this->_feedSamplePath.'/title/plain/dc11/rss094.xml')
  220. );
  221. $this->assertEquals('My Title', $feed->getTitle());
  222. }
  223. public function testGetsTitleFromRss093_Dc11()
  224. {
  225. $feed = Zend_Feed_Reader::importString(
  226. file_get_contents($this->_feedSamplePath.'/title/plain/dc11/rss093.xml')
  227. );
  228. $this->assertEquals('My Title', $feed->getTitle());
  229. }
  230. public function testGetsTitleFromRss092_Dc11()
  231. {
  232. $feed = Zend_Feed_Reader::importString(
  233. file_get_contents($this->_feedSamplePath.'/title/plain/dc11/rss092.xml')
  234. );
  235. $this->assertEquals('My Title', $feed->getTitle());
  236. }
  237. public function testGetsTitleFromRss091_Dc11()
  238. {
  239. $feed = Zend_Feed_Reader::importString(
  240. file_get_contents($this->_feedSamplePath.'/title/plain/dc11/rss091.xml')
  241. );
  242. $this->assertEquals('My Title', $feed->getTitle());
  243. }
  244. public function testGetsTitleFromRss10_Dc11()
  245. {
  246. $feed = Zend_Feed_Reader::importString(
  247. file_get_contents($this->_feedSamplePath.'/title/plain/dc11/rss10.xml')
  248. );
  249. $this->assertEquals('My Title', $feed->getTitle());
  250. }
  251. public function testGetsTitleFromRss090_Dc11()
  252. {
  253. $feed = Zend_Feed_Reader::importString(
  254. file_get_contents($this->_feedSamplePath.'/title/plain/dc11/rss090.xml')
  255. );
  256. $this->assertEquals('My Title', $feed->getTitle());
  257. }
  258. // Atom 1.0
  259. public function testGetsTitleFromRss20_atom10()
  260. {
  261. $feed = Zend_Feed_Reader::importString(
  262. file_get_contents($this->_feedSamplePath.'/title/plain/atom10/rss20.xml')
  263. );
  264. $this->assertEquals('My Title', $feed->getTitle());
  265. }
  266. public function testGetsTitleFromRss094_atom10()
  267. {
  268. $feed = Zend_Feed_Reader::importString(
  269. file_get_contents($this->_feedSamplePath.'/title/plain/atom10/rss094.xml')
  270. );
  271. $this->assertEquals('My Title', $feed->getTitle());
  272. }
  273. public function testGetsTitleFromRss093_atom10()
  274. {
  275. $feed = Zend_Feed_Reader::importString(
  276. file_get_contents($this->_feedSamplePath.'/title/plain/atom10/rss093.xml')
  277. );
  278. $this->assertEquals('My Title', $feed->getTitle());
  279. }
  280. public function testGetsTitleFromRss092_atom10()
  281. {
  282. $feed = Zend_Feed_Reader::importString(
  283. file_get_contents($this->_feedSamplePath.'/title/plain/atom10/rss092.xml')
  284. );
  285. $this->assertEquals('My Title', $feed->getTitle());
  286. }
  287. public function testGetsTitleFromRss091_atom10()
  288. {
  289. $feed = Zend_Feed_Reader::importString(
  290. file_get_contents($this->_feedSamplePath.'/title/plain/atom10/rss091.xml')
  291. );
  292. $this->assertEquals('My Title', $feed->getTitle());
  293. }
  294. public function testGetsTitleFromRss10_atom10()
  295. {
  296. $feed = Zend_Feed_Reader::importString(
  297. file_get_contents($this->_feedSamplePath.'/title/plain/atom10/rss10.xml')
  298. );
  299. $this->assertEquals('My Title', $feed->getTitle());
  300. }
  301. public function testGetsTitleFromRss090_atom10()
  302. {
  303. $feed = Zend_Feed_Reader::importString(
  304. file_get_contents($this->_feedSamplePath.'/title/plain/atom10/rss090.xml')
  305. );
  306. $this->assertEquals('My Title', $feed->getTitle());
  307. }
  308. // Missing Title
  309. public function testGetsTitleFromRss20_None()
  310. {
  311. $feed = Zend_Feed_Reader::importString(
  312. file_get_contents($this->_feedSamplePath.'/title/plain/none/rss20.xml')
  313. );
  314. $this->assertEquals(null, $feed->getTitle());
  315. }
  316. public function testGetsTitleFromRss094_None()
  317. {
  318. $feed = Zend_Feed_Reader::importString(
  319. file_get_contents($this->_feedSamplePath.'/title/plain/none/rss094.xml')
  320. );
  321. $this->assertEquals(null, $feed->getTitle());
  322. }
  323. public function testGetsTitleFromRss093_None()
  324. {
  325. $feed = Zend_Feed_Reader::importString(
  326. file_get_contents($this->_feedSamplePath.'/title/plain/none/rss093.xml')
  327. );
  328. $this->assertEquals(null, $feed->getTitle());
  329. }
  330. public function testGetsTitleFromRss092_None()
  331. {
  332. $feed = Zend_Feed_Reader::importString(
  333. file_get_contents($this->_feedSamplePath.'/title/plain/none/rss092.xml')
  334. );
  335. $this->assertEquals(null, $feed->getTitle());
  336. }
  337. public function testGetsTitleFromRss091_None()
  338. {
  339. $feed = Zend_Feed_Reader::importString(
  340. file_get_contents($this->_feedSamplePath.'/title/plain/none/rss091.xml')
  341. );
  342. $this->assertEquals(null, $feed->getTitle());
  343. }
  344. public function testGetsTitleFromRss10_None()
  345. {
  346. $feed = Zend_Feed_Reader::importString(
  347. file_get_contents($this->_feedSamplePath.'/title/plain/none/rss10.xml')
  348. );
  349. $this->assertEquals(null, $feed->getTitle());
  350. }
  351. public function testGetsTitleFromRss090_None()
  352. {
  353. $feed = Zend_Feed_Reader::importString(
  354. file_get_contents($this->_feedSamplePath.'/title/plain/none/rss090.xml')
  355. );
  356. $this->assertEquals(null, $feed->getTitle());
  357. }
  358. /**
  359. * Get Authors (Unencoded Text)
  360. */
  361. public function testGetsAuthorArrayFromRss20()
  362. {
  363. $feed = Zend_Feed_Reader::importString(
  364. file_get_contents($this->_feedSamplePath.'/author/plain/rss20.xml')
  365. );
  366. $this->assertEquals(array(
  367. array('email'=>'joe@example.com','name'=>'Joe Bloggs'),
  368. array('email'=>'jane@example.com','name'=>'Jane Bloggs')
  369. ), (array) $feed->getAuthors());
  370. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors()->getValues());
  371. }
  372. public function testGetsAuthorArrayFromRss094()
  373. {
  374. $feed = Zend_Feed_Reader::importString(
  375. file_get_contents($this->_feedSamplePath.'/author/plain/rss094.xml')
  376. );
  377. $this->assertEquals(array(
  378. array('email'=>'joe@example.com','name'=>'Joe Bloggs'),
  379. array('email'=>'jane@example.com','name'=>'Jane Bloggs')
  380. ), (array) $feed->getAuthors());
  381. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors()->getValues());
  382. }
  383. public function testGetsAuthorArrayFromRss093()
  384. {
  385. $feed = Zend_Feed_Reader::importString(
  386. file_get_contents($this->_feedSamplePath.'/author/plain/rss093.xml')
  387. );
  388. $this->assertEquals(array(
  389. array('email'=>'joe@example.com','name'=>'Joe Bloggs'),
  390. array('email'=>'jane@example.com','name'=>'Jane Bloggs')
  391. ), (array) $feed->getAuthors());
  392. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors()->getValues());
  393. }
  394. public function testGetsAuthorArrayFromRss092()
  395. {
  396. $feed = Zend_Feed_Reader::importString(
  397. file_get_contents($this->_feedSamplePath.'/author/plain/rss092.xml')
  398. );
  399. $this->assertEquals(array(
  400. array('email'=>'joe@example.com','name'=>'Joe Bloggs'),
  401. array('email'=>'jane@example.com','name'=>'Jane Bloggs')
  402. ), (array) $feed->getAuthors());
  403. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors()->getValues());
  404. }
  405. public function testGetsAuthorArrayFromRss091()
  406. {
  407. $feed = Zend_Feed_Reader::importString(
  408. file_get_contents($this->_feedSamplePath.'/author/plain/rss091.xml')
  409. );
  410. $this->assertEquals(array(
  411. array('email'=>'joe@example.com','name'=>'Joe Bloggs'),
  412. array('email'=>'jane@example.com','name'=>'Jane Bloggs')
  413. ), (array) $feed->getAuthors());
  414. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors()->getValues());
  415. }
  416. public function testGetsAuthorArrayFromRss10()
  417. {
  418. $feed = Zend_Feed_Reader::importString(
  419. file_get_contents($this->_feedSamplePath.'/author/plain/rss10.xml')
  420. );
  421. $this->assertEquals(array(
  422. array('email'=>'joe@example.com','name'=>'Joe Bloggs'),
  423. array('email'=>'jane@example.com','name'=>'Jane Bloggs')
  424. ), (array) $feed->getAuthors());
  425. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors()->getValues());
  426. }
  427. public function testGetsAuthorArrayFromRss090()
  428. {
  429. $feed = Zend_Feed_Reader::importString(
  430. file_get_contents($this->_feedSamplePath.'/author/plain/rss090.xml')
  431. );
  432. $this->assertEquals(array(
  433. array('email'=>'joe@example.com','name'=>'Joe Bloggs'),
  434. array('email'=>'jane@example.com','name'=>'Jane Bloggs')
  435. ), (array) $feed->getAuthors());
  436. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors()->getValues());
  437. }
  438. // DC 1.0
  439. public function testGetsAuthorArrayFromRss20_Dc10()
  440. {
  441. $feed = Zend_Feed_Reader::importString(
  442. file_get_contents($this->_feedSamplePath.'/author/plain/dc10/rss20.xml')
  443. );
  444. $this->assertEquals(array(
  445. array('name'=>'Joe Bloggs'), array('name'=>'Jane Bloggs')
  446. ), (array) $feed->getAuthors());
  447. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors()->getValues());
  448. }
  449. public function testGetsAuthorArrayFromRss094_Dc10()
  450. {
  451. $feed = Zend_Feed_Reader::importString(
  452. file_get_contents($this->_feedSamplePath.'/author/plain/dc10/rss094.xml')
  453. );
  454. $this->assertEquals(array(
  455. array('name'=>'Joe Bloggs'), array('name'=>'Jane Bloggs')
  456. ), (array) $feed->getAuthors());
  457. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors()->getValues());
  458. }
  459. public function testGetsAuthorArrayFromRss093_Dc10()
  460. {
  461. $feed = Zend_Feed_Reader::importString(
  462. file_get_contents($this->_feedSamplePath.'/author/plain/dc10/rss093.xml')
  463. );
  464. $this->assertEquals(array(
  465. array('name'=>'Joe Bloggs'), array('name'=>'Jane Bloggs')
  466. ), (array) $feed->getAuthors());
  467. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors()->getValues());
  468. }
  469. public function testGetsAuthorArrayFromRss092_Dc10()
  470. {
  471. $feed = Zend_Feed_Reader::importString(
  472. file_get_contents($this->_feedSamplePath.'/author/plain/dc10/rss092.xml')
  473. );
  474. $this->assertEquals(array(
  475. array('name'=>'Joe Bloggs'), array('name'=>'Jane Bloggs')
  476. ), (array) $feed->getAuthors());
  477. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors()->getValues());
  478. }
  479. public function testGetsAuthorArrayFromRss091_Dc10()
  480. {
  481. $feed = Zend_Feed_Reader::importString(
  482. file_get_contents($this->_feedSamplePath.'/author/plain/dc10/rss091.xml')
  483. );
  484. $this->assertEquals(array(
  485. array('name'=>'Joe Bloggs'), array('name'=>'Jane Bloggs')
  486. ), (array) $feed->getAuthors());
  487. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors()->getValues());
  488. }
  489. public function testGetsAuthorArrayFromRss10_Dc10()
  490. {
  491. $feed = Zend_Feed_Reader::importString(
  492. file_get_contents($this->_feedSamplePath.'/author/plain/dc10/rss10.xml')
  493. );
  494. $this->assertEquals(array(
  495. array('name'=>'Joe Bloggs'), array('name'=>'Jane Bloggs')
  496. ), (array) $feed->getAuthors());
  497. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors()->getValues());
  498. }
  499. public function testGetsAuthorArrayFromRss090_Dc10()
  500. {
  501. $feed = Zend_Feed_Reader::importString(
  502. file_get_contents($this->_feedSamplePath.'/author/plain/dc10/rss090.xml')
  503. );
  504. $this->assertEquals(array(
  505. array('name'=>'Joe Bloggs'), array('name'=>'Jane Bloggs')
  506. ), (array) $feed->getAuthors());
  507. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors()->getValues());;
  508. }
  509. // DC 1.1
  510. public function testGetsAuthorArrayFromRss20_Dc11()
  511. {
  512. $feed = Zend_Feed_Reader::importString(
  513. file_get_contents($this->_feedSamplePath.'/author/plain/dc11/rss20.xml')
  514. );
  515. $this->assertEquals(array(
  516. array('name'=>'Joe Bloggs'), array('name'=>'Jane Bloggs')
  517. ), (array) $feed->getAuthors());
  518. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors()->getValues());
  519. }
  520. public function testGetsAuthorArrayFromRss094_Dc11()
  521. {
  522. $feed = Zend_Feed_Reader::importString(
  523. file_get_contents($this->_feedSamplePath.'/author/plain/dc11/rss094.xml')
  524. );
  525. $this->assertEquals(array(
  526. array('name'=>'Joe Bloggs'), array('name'=>'Jane Bloggs')
  527. ), (array) $feed->getAuthors());
  528. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors()->getValues());
  529. }
  530. public function testGetsAuthorArrayFromRss093_Dc11()
  531. {
  532. $feed = Zend_Feed_Reader::importString(
  533. file_get_contents($this->_feedSamplePath.'/author/plain/dc11/rss093.xml')
  534. );
  535. $this->assertEquals(array(
  536. array('name'=>'Joe Bloggs'), array('name'=>'Jane Bloggs')
  537. ), (array) $feed->getAuthors());
  538. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors()->getValues());
  539. }
  540. public function testGetsAuthorArrayFromRss092_Dc11()
  541. {
  542. $feed = Zend_Feed_Reader::importString(
  543. file_get_contents($this->_feedSamplePath.'/author/plain/dc11/rss092.xml')
  544. );
  545. $this->assertEquals(array(
  546. array('name'=>'Joe Bloggs'), array('name'=>'Jane Bloggs')
  547. ), (array) $feed->getAuthors());
  548. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors()->getValues());
  549. }
  550. public function testGetsAuthorArrayFromRss091_Dc11()
  551. {
  552. $feed = Zend_Feed_Reader::importString(
  553. file_get_contents($this->_feedSamplePath.'/author/plain/dc11/rss091.xml')
  554. );
  555. $this->assertEquals(array(
  556. array('name'=>'Joe Bloggs'), array('name'=>'Jane Bloggs')
  557. ), (array) $feed->getAuthors());
  558. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors()->getValues());
  559. }
  560. public function testGetsAuthorArrayFromRss10_Dc11()
  561. {
  562. $feed = Zend_Feed_Reader::importString(
  563. file_get_contents($this->_feedSamplePath.'/author/plain/dc11/rss10.xml')
  564. );
  565. $this->assertEquals(array(
  566. array('name'=>'Joe Bloggs'), array('name'=>'Jane Bloggs')
  567. ), (array) $feed->getAuthors());
  568. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors()->getValues());
  569. }
  570. public function testGetsAuthorArrayFromRss090_Dc11()
  571. {
  572. $feed = Zend_Feed_Reader::importString(
  573. file_get_contents($this->_feedSamplePath.'/author/plain/dc11/rss090.xml')
  574. );
  575. $this->assertEquals(array(
  576. array('name'=>'Joe Bloggs'), array('name'=>'Jane Bloggs')
  577. ), (array) $feed->getAuthors());
  578. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors()->getValues());
  579. }
  580. // Atom 1.0
  581. public function testGetsAuthorArrayFromRss20_Atom10()
  582. {
  583. $feed = Zend_Feed_Reader::importString(
  584. file_get_contents($this->_feedSamplePath.'/author/plain/atom10/rss20.xml')
  585. );
  586. $this->assertEquals(array(
  587. array('name'=>'Joe Bloggs'), array('name'=>'Jane Bloggs')
  588. ), (array) $feed->getAuthors());
  589. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors()->getValues());
  590. }
  591. public function testGetsAuthorArrayFromRss094_Atom10()
  592. {
  593. $feed = Zend_Feed_Reader::importString(
  594. file_get_contents($this->_feedSamplePath.'/author/plain/atom10/rss094.xml')
  595. );
  596. $this->assertEquals(array(
  597. array('name'=>'Joe Bloggs'), array('name'=>'Jane Bloggs')
  598. ), (array) $feed->getAuthors());
  599. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors()->getValues());
  600. }
  601. public function testGetsAuthorArrayFromRss093_Atom10()
  602. {
  603. $feed = Zend_Feed_Reader::importString(
  604. file_get_contents($this->_feedSamplePath.'/author/plain/atom10/rss093.xml')
  605. );
  606. $this->assertEquals(array(
  607. array('name'=>'Joe Bloggs'), array('name'=>'Jane Bloggs')
  608. ), (array) $feed->getAuthors());
  609. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors()->getValues());
  610. }
  611. public function testGetsAuthorArrayFromRss092_Atom10()
  612. {
  613. $feed = Zend_Feed_Reader::importString(
  614. file_get_contents($this->_feedSamplePath.'/author/plain/atom10/rss092.xml')
  615. );
  616. $this->assertEquals(array(
  617. array('name'=>'Joe Bloggs'), array('name'=>'Jane Bloggs')
  618. ), (array) $feed->getAuthors());
  619. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors()->getValues());
  620. }
  621. public function testGetsAuthorArrayFromRss091_Atom10()
  622. {
  623. $feed = Zend_Feed_Reader::importString(
  624. file_get_contents($this->_feedSamplePath.'/author/plain/atom10/rss091.xml')
  625. );
  626. $this->assertEquals(array(
  627. array('name'=>'Joe Bloggs'), array('name'=>'Jane Bloggs')
  628. ), (array) $feed->getAuthors());
  629. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors()->getValues());
  630. }
  631. public function testGetsAuthorArrayFromRss10_Atom10()
  632. {
  633. $feed = Zend_Feed_Reader::importString(
  634. file_get_contents($this->_feedSamplePath.'/author/plain/atom10/rss10.xml')
  635. );
  636. $this->assertEquals(array(
  637. array('name'=>'Joe Bloggs'), array('name'=>'Jane Bloggs')
  638. ), (array) $feed->getAuthors());
  639. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors()->getValues());
  640. }
  641. public function testGetsAuthorArrayFromRss090_Atom10()
  642. {
  643. $feed = Zend_Feed_Reader::importString(
  644. file_get_contents($this->_feedSamplePath.'/author/plain/atom10/rss090.xml')
  645. );
  646. $this->assertEquals(array(
  647. array('name'=>'Joe Bloggs'), array('name'=>'Jane Bloggs')
  648. ), (array) $feed->getAuthors());
  649. $this->assertEquals(array('Joe Bloggs','Jane Bloggs'), $feed->getAuthors()->getValues());
  650. }
  651. // Missing Authors
  652. public function testGetsAuthorArrayFromRss20_None()
  653. {
  654. $feed = Zend_Feed_Reader::importString(
  655. file_get_contents($this->_feedSamplePath.'/author/plain/none/rss20.xml')
  656. );
  657. $this->assertEquals(null, $feed->getAuthors());
  658. }
  659. public function testGetsAuthorArrayFromRss094_None()
  660. {
  661. $feed = Zend_Feed_Reader::importString(
  662. file_get_contents($this->_feedSamplePath.'/author/plain/none/rss094.xml')
  663. );
  664. $this->assertEquals(null, $feed->getAuthors());
  665. }
  666. public function testGetsAuthorArrayFromRss093_None()
  667. {
  668. $feed = Zend_Feed_Reader::importString(
  669. file_get_contents($this->_feedSamplePath.'/author/plain/none/rss093.xml')
  670. );
  671. $this->assertEquals(null, $feed->getAuthors());
  672. }
  673. public function testGetsAuthorArrayFromRss092_None()
  674. {
  675. $feed = Zend_Feed_Reader::importString(
  676. file_get_contents($this->_feedSamplePath.'/author/plain/none/rss092.xml')
  677. );
  678. $this->assertEquals(null, $feed->getAuthors());
  679. }
  680. public function testGetsAuthorArrayFromRss091_None()
  681. {
  682. $feed = Zend_Feed_Reader::importString(
  683. file_get_contents($this->_feedSamplePath.'/author/plain/none/rss091.xml')
  684. );
  685. $this->assertEquals(null, $feed->getAuthors());
  686. }
  687. public function testGetsAuthorArrayFromRss10_None()
  688. {
  689. $feed = Zend_Feed_Reader::importString(
  690. file_get_contents($this->_feedSamplePath.'/author/plain/none/rss10.xml')
  691. );
  692. $this->assertEquals(null, $feed->getAuthors());
  693. }
  694. public function testGetsAuthorArrayFromRss090_None()
  695. {
  696. $feed = Zend_Feed_Reader::importString(
  697. file_get_contents($this->_feedSamplePath.'/author/plain/none/rss090.xml')
  698. );
  699. $this->assertEquals(null, $feed->getAuthors());
  700. }
  701. /**
  702. * Get Single Author (Unencoded Text)
  703. */
  704. public function testGetsSingleAuthorFromRss20()
  705. {
  706. $feed = Zend_Feed_Reader::importString(
  707. file_get_contents($this->_feedSamplePath.'/author/plain/rss20.xml')
  708. );
  709. $this->assertEquals(array('name'=>'Joe Bloggs','email'=>'joe@example.com'), $feed->getAuthor());
  710. }
  711. public function testGetsSingleAuthorFromRss094()
  712. {
  713. $feed = Zend_Feed_Reader::importString(
  714. file_get_contents($this->_feedSamplePath.'/author/plain/rss094.xml')
  715. );
  716. $this->assertEquals(array('name'=>'Joe Bloggs','email'=>'joe@example.com'), $feed->getAuthor());
  717. }
  718. public function testGetsSingleAuthorFromRss093()
  719. {
  720. $feed = Zend_Feed_Reader::importString(
  721. file_get_contents($this->_feedSamplePath.'/author/plain/rss093.xml')
  722. );
  723. $this->assertEquals(array('name'=>'Joe Bloggs','email'=>'joe@example.com'), $feed->getAuthor());
  724. }
  725. public function testGetsSingleAuthorFromRss092()
  726. {
  727. $feed = Zend_Feed_Reader::importString(
  728. file_get_contents($this->_feedSamplePath.'/author/plain/rss092.xml')
  729. );
  730. $this->assertEquals(array('name'=>'Joe Bloggs','email'=>'joe@example.com'), $feed->getAuthor());
  731. }
  732. public function testGetsSingleAuthorFromRss091()
  733. {
  734. $feed = Zend_Feed_Reader::importString(
  735. file_get_contents($this->_feedSamplePath.'/author/plain/rss091.xml')
  736. );
  737. $this->assertEquals(array('name'=>'Joe Bloggs','email'=>'joe@example.com'), $feed->getAuthor());
  738. }
  739. public function testGetsSingleAuthorFromRss10()
  740. {
  741. $feed = Zend_Feed_Reader::importString(
  742. file_get_contents($this->_feedSamplePath.'/author/plain/rss10.xml')
  743. );
  744. $this->assertEquals(array('name'=>'Joe Bloggs','email'=>'joe@example.com'), $feed->getAuthor());
  745. }
  746. public function testGetsSingleAuthorFromRss090()
  747. {
  748. $feed = Zend_Feed_Reader::importString(
  749. file_get_contents($this->_feedSamplePath.'/author/plain/rss090.xml')
  750. );
  751. $this->assertEquals(array('name'=>'Joe Bloggs','email'=>'joe@example.com'), $feed->getAuthor());
  752. }
  753. // DC 1.0
  754. public function testGetsSingleAuthorFromRss20_Dc10()
  755. {
  756. $feed = Zend_Feed_Reader::importString(
  757. file_get_contents($this->_feedSamplePath.'/author/plain/dc10/rss20.xml')
  758. );
  759. $this->assertEquals(array('name'=>'Joe Bloggs'), $feed->getAuthor());
  760. }
  761. public function testGetsSingleAuthorFromRss094_Dc10()
  762. {
  763. $feed = Zend_Feed_Reader::importString(
  764. file_get_contents($this->_feedSamplePath.'/author/plain/dc10/rss094.xml')
  765. );
  766. $this->assertEquals(array('name'=>'Joe Bloggs'), $feed->getAuthor());
  767. }
  768. public function testGetsSingleAuthorFromRss093_Dc10()
  769. {
  770. $feed = Zend_Feed_Reader::importString(
  771. file_get_contents($this->_feedSamplePath.'/author/plain/dc10/rss093.xml')
  772. );
  773. $this->assertEquals(array('name'=>'Joe Bloggs'), $feed->getAuthor());
  774. }
  775. public function testGetsSingleAuthorFromRss092_Dc10()
  776. {
  777. $feed = Zend_Feed_Reader::importString(
  778. file_get_contents($this->_feedSamplePath.'/author/plain/dc10/rss092.xml')
  779. );
  780. $this->assertEquals(array('name'=>'Joe Bloggs'), $feed->getAuthor());
  781. }
  782. public function testGetsSingleAuthorFromRss091_Dc10()
  783. {
  784. $feed = Zend_Feed_Reader::importString(
  785. file_get_contents($this->_feedSamplePath.'/author/plain/dc10/rss091.xml')
  786. );
  787. $this->assertEquals(array('name'=>'Joe Bloggs'), $feed->getAuthor());
  788. }
  789. public function testGetsSingleAuthorFromRss10_Dc10()
  790. {
  791. $feed = Zend_Feed_Reader::importString(
  792. file_get_contents($this->_feedSamplePath.'/author/plain/dc10/rss10.xml')
  793. );
  794. $this->assertEquals(array('name'=>'Joe Bloggs'), $feed->getAuthor());
  795. }
  796. public function testGetsSingleAuthorFromRss090_Dc10()
  797. {
  798. $feed = Zend_Feed_Reader::importString(
  799. file_get_contents($this->_feedSamplePath.'/author/plain/dc10/rss090.xml')
  800. );
  801. $this->assertEquals(array('name'=>'Joe Bloggs'), $feed->getAuthor());
  802. }
  803. // DC 1.1
  804. public function testGetsSingleAuthorFromRss20_Dc11()
  805. {
  806. $feed = Zend_Feed_Reader::importString(
  807. file_get_contents($this->_feedSamplePath.'/author/plain/dc11/rss20.xml')
  808. );
  809. $this->assertEquals(array('name'=>'Joe Bloggs'), $feed->getAuthor());
  810. }
  811. public function testGetsSingleAuthorFromRss094_Dc11()
  812. {
  813. $feed = Zend_Feed_Reader::importString(
  814. file_get_contents($this->_feedSamplePath.'/author/plain/dc11/rss094.xml')
  815. );
  816. $this->assertEquals(array('name'=>'Joe Bloggs'), $feed->getAuthor());
  817. }
  818. public function testGetsSingleAuthorFromRss093_Dc11()
  819. {
  820. $feed = Zend_Feed_Reader::importString(
  821. file_get_contents($this->_feedSamplePath.'/author/plain/dc11/rss093.xml')
  822. );
  823. $this->assertEquals(array('name'=>'Joe Bloggs'), $feed->getAuthor());
  824. }
  825. public function testGetsSingleAuthorFromRss092_Dc11()
  826. {
  827. $feed = Zend_Feed_Reader::importString(
  828. file_get_contents($this->_feedSamplePath.'/author/plain/dc11/rss092.xml')
  829. );
  830. $this->assertEquals(array('name'=>'Joe Bloggs'), $feed->getAuthor());
  831. }
  832. public function testGetsSingleAuthorFromRss091_Dc11()
  833. {
  834. $feed = Zend_Feed_Reader::importString(
  835. file_get_contents($this->_feedSamplePath.'/author/plain/dc11/rss091.xml')
  836. );
  837. $this->assertEquals(array('name'=>'Joe Bloggs'), $feed->getAuthor());
  838. }
  839. public function testGetsSingleAuthorFromRss10_Dc11()
  840. {
  841. $feed = Zend_Feed_Reader::importString(
  842. file_get_contents($this->_feedSamplePath.'/author/plain/dc11/rss10.xml')
  843. );
  844. $this->assertEquals(array('name'=>'Joe Bloggs'), $feed->getAuthor());
  845. }
  846. public function testGetsSingleAuthorFromRss090_Dc11()
  847. {
  848. $feed = Zend_Feed_Reader::importString(
  849. file_get_contents($this->_feedSamplePath.'/author/plain/dc11/rss090.xml')
  850. );
  851. $this->assertEquals(array('name'=>'Joe Bloggs'), $feed->getAuthor());
  852. }
  853. // Missing Author
  854. public function testGetsSingleAuthorFromRss20_None()
  855. {
  856. $feed = Zend_Feed_Reader::importString(
  857. file_get_contents($this->_feedSamplePath.'/author/plain/none/rss20.xml')
  858. );
  859. $this->assertEquals(null, $feed->getAuthor());
  860. }
  861. public function testGetsSingleAuthorFromRss094_None()
  862. {
  863. $feed = Zend_Feed_Reader::importString(
  864. file_get_contents($this->_feedSamplePath.'/author/plain/none/rss094.xml')
  865. );
  866. $this->assertEquals(null, $feed->getAuthor());
  867. }
  868. public function testGetsSingleAuthorFromRss093_None()
  869. {
  870. $feed = Zend_Feed_Reader::importString(
  871. file_get_contents($this->_feedSamplePath.'/author/plain/none/rss093.xml')
  872. );
  873. $this->assertEquals(null, $feed->getAuthor());
  874. }
  875. public function testGetsSingleAuthorFromRss092_None()
  876. {
  877. $feed = Zend_Feed_Reader::importString(
  878. file_get_contents($this->_feedSamplePath.'/author/plain/none/rss092.xml')
  879. );
  880. $this->assertEquals(null, $feed->getAuthor());
  881. }
  882. public function testGetsSingleAuthorFromRss091_None()
  883. {
  884. $feed = Zend_Feed_Reader::importString(
  885. file_get_contents($this->_feedSamplePath.'/author/plain/none/rss091.xml')
  886. );
  887. $this->assertEquals(null, $feed->getAuthor());
  888. }
  889. public function testGetsSingleAuthorFromRss10_None()
  890. {
  891. $feed = Zend_Feed_Reader::importString(
  892. file_get_contents($this->_feedSamplePath.'/author/plain/none/rss10.xml')
  893. );
  894. $this->assertEquals(null, $feed->getAuthor());
  895. }
  896. public function testGetsSingleAuthorFromRss090_None()
  897. {
  898. $feed = Zend_Feed_Reader::importString(
  899. file_get_contents($this->_feedSamplePath.'/author/plain/none/rss090.xml')
  900. );
  901. $this->assertEquals(null, $feed->getAuthor());
  902. }
  903. /**
  904. * Get Copyright (Unencoded Text)
  905. */
  906. public function testGetsCopyrightFromRss20()
  907. {
  908. $feed = Zend_Feed_Reader::importString(
  909. file_get_contents($this->_feedSamplePath.'/copyright/plain/rss20.xml')
  910. );
  911. $this->assertEquals('Copyright 2008', $feed->getCopyright());
  912. }
  913. public function testGetsCopyrightFromRss094()
  914. {
  915. $feed = Zend_Feed_Reader::importString(
  916. file_get_contents($this->_feedSamplePath.'/copyright/plain/rss094.xml')
  917. );
  918. $this->assertEquals('Copyright 2008', $feed->getCopyright());
  919. }
  920. public function testGetsCopyrightFromRss093()
  921. {
  922. $feed = Zend_Feed_Reader::importString(
  923. file_get_contents($this->_feedSamplePath.'/copyright/plain/rss093.xml')
  924. );
  925. $this->assertEquals('Copyright 2008', $feed->getCopyright());
  926. }
  927. public function testGetsCopyrightFromRss092()
  928. {
  929. $feed = Zend_Feed_Reader::importString(
  930. file_get_contents($this->_feedSamplePath.'/copyright/plain/rss092.xml')
  931. );
  932. $this->assertEquals('Copyright 2008', $feed->getCopyright());
  933. }
  934. public function testGetsCopyrightFromRss091()
  935. {
  936. $feed = Zend_Feed_Reader::importString(
  937. file_get_contents($this->_feedSamplePath.'/copyright/plain/rss091.xml')
  938. );
  939. $this->assertEquals('Copyright 2008', $feed->getCopyright());
  940. }
  941. public function testGetsCopyrightFromRss10()
  942. {
  943. $feed = Zend_Feed_Reader::importString(
  944. file_get_contents($this->_feedSamplePath.'/copyright/plain/rss10.xml')
  945. );
  946. $this->assertEquals(null, $feed->getCopyright());
  947. }
  948. public function testGetsCopyrightFromRss090()
  949. {
  950. $feed = Zend_Feed_Reader::importString(
  951. file_get_contents($this->_feedSamplePath.'/copyright/plain/rss090.xml')
  952. );
  953. $this->assertEquals(null, $feed->getCopyright());
  954. }
  955. // DC 1.0
  956. public function testGetsCopyrightFromRss20_Dc10()
  957. {
  958. $feed = Zend_Feed_Reader::importString(
  959. file_get_contents($this->_feedSamplePath.'/copyright/plain/dc10/rss20.xml')
  960. );
  961. $this->assertEquals('Copyright 2008', $feed->getCopyright());
  962. }
  963. public function testGetsCopyrightFromRss094_Dc10()
  964. {
  965. $feed = Zend_Feed_Reader::importString(
  966. file_get_contents($this->_feedSamplePath.'/copyright/plain/dc10/rss094.xml')
  967. );
  968. $this->assertEquals('Copyright 2008', $feed->getCopyright());
  969. }
  970. public function testGetsCopyrightFromRss093_Dc10()
  971. {
  972. $feed = Zend_Feed_Reader::importString(
  973. file_get_contents($this->_feedSamplePath.'/copyright/plain/dc10/rss093.xml')
  974. );
  975. $this->assertEquals('Copyright 2008', $feed->getCopyright());
  976. }
  977. public function testGetsCopyrightFromRss092_Dc10()
  978. {
  979. $feed = Zend_Feed_Reader::importString(
  980. file_get_contents($this->_feedSamplePath.'/copyright/plain/dc10/rss092.xml')
  981. );
  982. $this->assertEquals('Copyright 2008', $feed->getCopyright());
  983. }
  984. public function testGetsCopyrightFromRss091_Dc10()
  985. {
  986. $feed = Zend_Feed_Reader::importString(
  987. file_get_contents($this->_feedSamplePath.'/copyright/plain/dc10/rss091.xml')
  988. );
  989. $this->assertEquals('Copyright 2008', $feed->getCopyright());
  990. }
  991. public function testGetsCopyrightFromRss10_Dc10()
  992. {
  993. $feed = Zend_Feed_Reader::importString(
  994. file_get_contents($this->_feedSamplePath.'/copyright/plain/dc10/rss10.xml')
  995. );
  996. $this->assertEquals('Copyright 2008', $feed->getCopyright());
  997. }
  998. public function testGetsCopyrightFromRss090_Dc10()
  999. {
  1000. $feed = Zend_Feed_Reader::importString(
  1001. file_get_contents($this->_feedSamplePath.'/copyright/plain/dc10/rss090.xml')
  1002. );
  1003. $this->assertEquals('Copyright 2008', $feed->getCopyright());
  1004. }
  1005. // DC 1.1
  1006. public function testGetsCopyrightFromRss20_Dc11()
  1007. {
  1008. $feed = Zend_Feed_Reader::importString(
  1009. file_get_contents($this->_feedSamplePath.'/copyright/plain/dc11/rss20.xml')
  1010. );
  1011. $this->assertEquals('Copyright 2008', $feed->getCopyright());
  1012. }
  1013. public function testGetsCopyrightFromRss094_Dc11()
  1014. {
  1015. $feed = Zend_Feed_Reader::importString(
  1016. file_get_contents($this->_feedSamplePath.'/copyright/plain/dc11/rss094.xml')
  1017. );
  1018. $this->assertEquals('Copyright 2008', $feed->getCopyright());
  1019. }
  1020. public function testGetsCopyrightFromRss093_Dc11()
  1021. {
  1022. $feed = Zend_Feed_Reader::importString(
  1023. file_get_contents($this->_feedSamplePath.'/copyright/plain/dc11/rss093.xml')
  1024. );
  1025. $this->assertEquals('Copyright 2008', $feed->getCopyright());
  1026. }
  1027. public function testGetsCopyrightFromRss092_Dc11()
  1028. {
  1029. $feed = Zend_Feed_Reader::importString(
  1030. file_get_contents($this->_feedSamplePath.'/copyright/plain/dc11/rss092.xml')
  1031. );
  1032. $this->assertEquals('Copyright 2008', $feed->getCopyright());
  1033. }
  1034. public function testGetsCopyrightFromRss091_Dc11()
  1035. {
  1036. $feed = Zend_Feed_Reader::importString(
  1037. file_get_contents($this->_feedSamplePath.'/copyright/plain/dc11/rss091.xml')
  1038. );
  1039. $this->assertEquals('Copyright 2008', $feed->getCopyright());
  1040. }
  1041. public function testGetsCopyrightFromRss10_Dc11()
  1042. {
  1043. $feed = Zend_Feed_Reader::importString(
  1044. file_get_contents($this->_feedSamplePath.'/copyright/plain/dc11/rss10.xml')
  1045. );
  1046. $this->assertEquals('Copyright 2008', $feed->getCopyright());
  1047. }
  1048. public function testGetsCopyrightFromRss090_Dc11()
  1049. {
  1050. $feed = Zend_Feed_Reader::importString(
  1051. file_get_contents($this->_feedSamplePath.'/copyright/plain/dc11/rss090.xml')
  1052. );
  1053. $this->assertEquals('Copyright 2008', $feed->getCopyright());
  1054. }
  1055. // Missing Copyright
  1056. public function testGetsCopyrightFromRss20_None()
  1057. {
  1058. $feed = Zend_Feed_Reader::importString(
  1059. file_get_contents($this->_feedSamplePath.'/copyright/plain/none/rss20.xml')
  1060. );
  1061. $this->assertEquals(null, $feed->getCopyright());
  1062. }
  1063. public function testGetsCopyrightFromRss094_None()
  1064. {
  1065. $feed = Zend_Feed_Reader::importString(
  1066. file_get_contents($this->_feedSamplePath.'/copyright/plain/none/rss094.xml')
  1067. );
  1068. $this->assertEquals(null, $feed->getCopyright());
  1069. }
  1070. public function testGetsCopyrightFromRss093_None()
  1071. {
  1072. $feed = Zend_Feed_Reader::importString(
  1073. file_get_contents($this->_feedSamplePath.'/copyright/plain/none/rss093.xml')
  1074. );
  1075. $this->assertEquals(null, $feed->getCopyright());
  1076. }
  1077. public function testGetsCopyrightFromRss092_None()
  1078. {
  1079. $feed = Zend_Feed_Reader::importString(
  1080. file_get_contents($this->_feedSamplePath.'/copyright/plain/none/rss092.xml')
  1081. );
  1082. $this->assertEquals(null, $feed->getCopyright());
  1083. }
  1084. public function testGetsCopyrightFromRss091_None()
  1085. {
  1086. $feed = Zend_Feed_Reader::importString(
  1087. file_get_contents($this->_feedSamplePath.'/copyright/plain/none/rss091.xml')
  1088. );
  1089. $this->assertEquals(null, $feed->getCopyright());
  1090. }
  1091. public function testGetsCopyrightFromRss10_None()
  1092. {
  1093. $feed = Zend_Feed_Reader::importString(
  1094. file_get_contents($this->_feedSamplePath.'/copyright/plain/none/rss10.xml')
  1095. );
  1096. $this->assertEquals(null, $feed->getCopyright());
  1097. }
  1098. public function testGetsCopyrightFromRss090_None()
  1099. {
  1100. $feed = Zend_Feed_Reader::importString(
  1101. file_get_contents($this->_feedSamplePath.'/copyright/plain/none/rss090.xml')
  1102. );
  1103. $this->assertEquals(null, $feed->getCopyright());
  1104. }
  1105. /**
  1106. * Get Description (Unencoded Text)
  1107. */
  1108. public function testGetsDescriptionFromRss20()
  1109. {
  1110. $feed = Zend_Feed_Reader::importString(
  1111. file_get_contents($this->_feedSamplePath.'/description/plain/rss20.xml')
  1112. );
  1113. $this->assertEquals('My Description', $feed->getDescription());
  1114. }
  1115. public function testGetsDescriptionFromRss094()
  1116. {
  1117. $feed = Zend_Feed_Reader::importString(
  1118. file_get_contents($this->_feedSamplePath.'/description/plain/rss094.xml')
  1119. );
  1120. $this->assertEquals('My Description', $feed->getDescription());
  1121. }
  1122. public function testGetsDescriptionFromRss093()
  1123. {
  1124. $feed = Zend_Feed_Reader::importString(
  1125. file_get_contents($this->_feedSamplePath.'/description/plain/rss093.xml')
  1126. );
  1127. $this->assertEquals('My Description', $feed->getDescription());
  1128. }
  1129. public function testGetsDescriptionFromRss092()
  1130. {
  1131. $feed = Zend_Feed_Reader::importString(
  1132. file_get_contents($this->_feedSamplePath.'/description/plain/rss092.xml')
  1133. );
  1134. $this->assertEquals('My Description', $feed->getDescription());
  1135. }
  1136. public function testGetsDescriptionFromRss091()
  1137. {
  1138. $feed = Zend_Feed_Reader::importString(
  1139. file_get_contents($this->_feedSamplePath.'/description/plain/rss091.xml')
  1140. );
  1141. $this->assertEquals('My Description', $feed->getDescription());
  1142. }
  1143. public function testGetsDescriptionFromRss10()
  1144. {
  1145. $feed = Zend_Feed_Reader::importString(
  1146. file_get_contents($this->_feedSamplePath.'/description/plain/rss10.xml')
  1147. );
  1148. $this->assertEquals('My Description', $feed->getDescription());
  1149. }
  1150. public function testGetsDescriptionFromRss090()
  1151. {
  1152. $feed = Zend_Feed_Reader::importString(
  1153. file_get_contents($this->_feedSamplePath.'/description/plain/rss090.xml')
  1154. );
  1155. $this->assertEquals('My Description', $feed->getDescription());
  1156. }
  1157. // DC 1.0
  1158. public function testGetsDescriptionFromRss20_Dc10()
  1159. {
  1160. $feed = Zend_Feed_Reader::importString(
  1161. file_get_contents($this->_feedSamplePath.'/description/plain/dc10/rss20.xml')
  1162. );
  1163. $this->assertEquals('My Description', $feed->getDescription());
  1164. }
  1165. public function testGetsDescriptionFromRss094_Dc10()
  1166. {
  1167. $feed = Zend_Feed_Reader::importString(
  1168. file_get_contents($this->_feedSamplePath.'/description/plain/dc10/rss094.xml')
  1169. );
  1170. $this->assertEquals('My Description', $feed->getDescription());
  1171. }
  1172. public function testGetsDescriptionFromRss093_Dc10()
  1173. {
  1174. $feed = Zend_Feed_Reader::importString(
  1175. file_get_contents($this->_feedSamplePath.'/description/plain/dc10/rss093.xml')
  1176. );
  1177. $this->assertEquals('My Description', $feed->getDescription());
  1178. }
  1179. public function testGetsDescriptionFromRss092_Dc10()
  1180. {
  1181. $feed = Zend_Feed_Reader::importString(
  1182. file_get_contents($this->_feedSamplePath.'/description/plain/dc10/rss092.xml')
  1183. );
  1184. $this->assertEquals('My Description', $feed->getDescription());
  1185. }
  1186. public function testGetsDescriptionFromRss091_Dc10()
  1187. {
  1188. $feed = Zend_Feed_Reader::importString(
  1189. file_get_contents($this->_feedSamplePath.'/description/plain/dc10/rss091.xml')
  1190. );
  1191. $this->assertEquals('My Description', $feed->getDescription());
  1192. }
  1193. public function testGetsDescriptionFromRss10_Dc10()
  1194. {
  1195. $feed = Zend_Feed_Reader::importString(
  1196. file_get_contents($this->_feedSamplePath.'/description/plain/dc10/rss10.xml')
  1197. );
  1198. $this->assertEquals('My Description', $feed->getDescription());
  1199. }
  1200. public function testGetsDescriptionFromRss090_Dc10()
  1201. {
  1202. $feed = Zend_Feed_Reader::importString(
  1203. file_get_contents($this->_feedSamplePath.'/description/plain/dc10/rss090.xml')
  1204. );
  1205. $this->assertEquals('My Description', $feed->getDescription());
  1206. }
  1207. // DC 1.1
  1208. public function testGetsDescriptionFromRss20_Dc11()
  1209. {
  1210. $feed = Zend_Feed_Reader::importString(
  1211. file_get_contents($this->_feedSamplePath.'/description/plain/dc11/rss20.xml')
  1212. );
  1213. $this->assertEquals('My Description', $feed->getDescription());
  1214. }
  1215. public function testGetsDescriptionFromRss094_Dc11()
  1216. {
  1217. $feed = Zend_Feed_Reader::importString(
  1218. file_get_contents($this->_feedSamplePath.'/description/plain/dc11/rss094.xml')
  1219. );
  1220. $this->assertEquals('My Description', $feed->getDescription());
  1221. }
  1222. public function testGetsDescriptionFromRss093_Dc11()
  1223. {
  1224. $feed = Zend_Feed_Reader::importString(
  1225. file_get_contents($this->_feedSamplePath.'/description/plain/dc11/rss093.xml')
  1226. );
  1227. $this->assertEquals('My Description', $feed->getDescription());
  1228. }
  1229. public function testGetsDescriptionFromRss092_Dc11()
  1230. {
  1231. $feed = Zend_Feed_Reader::importString(
  1232. file_get_contents($this->_feedSamplePath.'/description/plain/dc11/rss092.xml')
  1233. );
  1234. $this->assertEquals('My Description', $feed->getDescription());
  1235. }
  1236. public function testGetsDescriptionFromRss091_Dc11()
  1237. {
  1238. $feed = Zend_Feed_Reader::importString(
  1239. file_get_contents($this->_feedSamplePath.'/description/plain/dc11/rss091.xml')
  1240. );
  1241. $this->assertEquals('My Description', $feed->getDescription());
  1242. }
  1243. public function testGetsDescriptionFromRss10_Dc11()
  1244. {
  1245. $feed = Zend_Feed_Reader::importString(
  1246. file_get_contents($this->_feedSamplePath.'/description/plain/dc11/rss10.xml')
  1247. );
  1248. $this->assertEquals('My Description', $feed->getDescription());
  1249. }
  1250. public function testGetsDescriptionFromRss090_Dc11()
  1251. {
  1252. $feed = Zend_Feed_Reader::importString(
  1253. file_get_contents($this->_feedSamplePath.'/description/plain/dc11/rss090.xml')
  1254. );
  1255. $this->assertEquals('My Description', $feed->getDescription());
  1256. }
  1257. // Missing Description
  1258. public function testGetsDescriptionFromRss20_None()
  1259. {
  1260. $feed = Zend_Feed_Reader::importString(
  1261. file_get_contents($this->_feedSamplePath.'/description/plain/none/rss20.xml')
  1262. );
  1263. $this->assertEquals(null, $feed->getDescription());
  1264. }
  1265. public function testGetsDescriptionFromRss094_None()
  1266. {
  1267. $feed = Zend_Feed_Reader::importString(
  1268. file_get_contents($this->_feedSamplePath.'/description/plain/none/rss094.xml')
  1269. );
  1270. $this->assertEquals(null, $feed->getDescription());
  1271. }
  1272. public function testGetsDescriptionFromRss093_None()
  1273. {
  1274. $feed = Zend_Feed_Reader::importString(
  1275. file_get_contents($this->_feedSamplePath.'/description/plain/none/rss093.xml')
  1276. );
  1277. $this->assertEquals(null, $feed->getDescription());
  1278. }
  1279. public function testGetsDescriptionFromRss092_None()
  1280. {
  1281. $feed = Zend_Feed_Reader::importString(
  1282. file_get_contents($this->_feedSamplePath.'/description/plain/none/rss092.xml')
  1283. );
  1284. $this->assertEquals(null, $feed->getDescription());
  1285. }
  1286. public function testGetsDescriptionFromRss091_None()
  1287. {
  1288. $feed = Zend_Feed_Reader::importString(
  1289. file_get_contents($this->_feedSamplePath.'/description/plain/none/rss091.xml')
  1290. );
  1291. $this->assertEquals(null, $feed->getDescription());
  1292. }
  1293. public function testGetsDescriptionFromRss10_None()
  1294. {
  1295. $feed = Zend_Feed_Reader::importString(
  1296. file_get_contents($this->_feedSamplePath.'/description/plain/none/rss10.xml')
  1297. );
  1298. $this->assertEquals(null, $feed->getDescription());
  1299. }
  1300. public function testGetsDescriptionFromRss090_None()
  1301. {
  1302. $feed = Zend_Feed_Reader::importString(
  1303. file_get_contents($this->_feedSamplePath.'/description/plain/none/rss090.xml')
  1304. );
  1305. $this->assertEquals(null, $feed->getDescription());
  1306. }
  1307. /**
  1308. * Get Language (Unencoded Text)
  1309. */
  1310. public function testGetsLanguageFromRss20()
  1311. {
  1312. $feed = Zend_Feed_Reader::importString(
  1313. file_get_contents($this->_feedSamplePath.'/language/plain/rss20.xml')
  1314. );
  1315. $this->assertEquals('en-GB', $feed->getLanguage());
  1316. }
  1317. public function testGetsLanguageFromRss094()
  1318. {
  1319. $feed = Zend_Feed_Reader::importString(
  1320. file_get_contents($this->_feedSamplePath.'/language/plain/rss094.xml')
  1321. );
  1322. $this->assertEquals('en-GB', $feed->getLanguage());
  1323. }
  1324. public function testGetsLanguageFromRss093()
  1325. {
  1326. $feed = Zend_Feed_Reader::importString(
  1327. file_get_contents($this->_feedSamplePath.'/language/plain/rss093.xml')
  1328. );
  1329. $this->assertEquals('en-GB', $feed->getLanguage());
  1330. }
  1331. public function testGetsLanguageFromRss092()
  1332. {
  1333. $feed = Zend_Feed_Reader::importString(
  1334. file_get_contents($this->_feedSamplePath.'/language/plain/rss092.xml')
  1335. );
  1336. $this->assertEquals('en-GB', $feed->getLanguage());
  1337. }
  1338. public function testGetsLanguageFromRss091()
  1339. {
  1340. $feed = Zend_Feed_Reader::importString(
  1341. file_get_contents($this->_feedSamplePath.'/language/plain/rss091.xml')
  1342. );
  1343. $this->assertEquals('en-GB', $feed->getLanguage());
  1344. }
  1345. public function testGetsLanguageFromRss10()
  1346. {
  1347. $feed = Zend_Feed_Reader::importString(
  1348. file_get_contents($this->_feedSamplePath.'/language/plain/rss10.xml')
  1349. );
  1350. $this->assertEquals(null, $feed->getLanguage());
  1351. }
  1352. public function testGetsLanguageFromRss090()
  1353. {
  1354. $feed = Zend_Feed_Reader::importString(
  1355. file_get_contents($this->_feedSamplePath.'/language/plain/rss090.xml')
  1356. );
  1357. $this->assertEquals(null, $feed->getLanguage());
  1358. }
  1359. // DC 1.0
  1360. public function testGetsLanguageFromRss20_Dc10()
  1361. {
  1362. $feed = Zend_Feed_Reader::importString(
  1363. file_get_contents($this->_feedSamplePath.'/language/plain/dc10/rss20.xml')
  1364. );
  1365. $this->assertEquals('en-GB', $feed->getLanguage());
  1366. }
  1367. public function testGetsLanguageFromRss094_Dc10()
  1368. {
  1369. $feed = Zend_Feed_Reader::importString(
  1370. file_get_contents($this->_feedSamplePath.'/language/plain/dc10/rss094.xml')
  1371. );
  1372. $this->assertEquals('en-GB', $feed->getLanguage());
  1373. }
  1374. public function testGetsLanguageFromRss093_Dc10()
  1375. {
  1376. $feed = Zend_Feed_Reader::importString(
  1377. file_get_contents($this->_feedSamplePath.'/language/plain/dc10/rss093.xml')
  1378. );
  1379. $this->assertEquals('en-GB', $feed->getLanguage());
  1380. }
  1381. public function testGetsLanguageFromRss092_Dc10()
  1382. {
  1383. $feed = Zend_Feed_Reader::importString(
  1384. file_get_contents($this->_feedSamplePath.'/language/plain/dc10/rss092.xml')
  1385. );
  1386. $this->assertEquals('en-GB', $feed->getLanguage());
  1387. }
  1388. public function testGetsLanguageFromRss091_Dc10()
  1389. {
  1390. $feed = Zend_Feed_Reader::importString(
  1391. file_get_contents($this->_feedSamplePath.'/language/plain/dc10/rss091.xml')
  1392. );
  1393. $this->assertEquals('en-GB', $feed->getLanguage());
  1394. }
  1395. public function testGetsLanguageFromRss10_Dc10()
  1396. {
  1397. $feed = Zend_Feed_Reader::importString(
  1398. file_get_contents($this->_feedSamplePath.'/language/plain/dc10/rss10.xml')
  1399. );
  1400. $this->assertEquals('en-GB', $feed->getLanguage());
  1401. }
  1402. public function testGetsLanguageFromRss090_Dc10()
  1403. {
  1404. $feed = Zend_Feed_Reader::importString(
  1405. file_get_contents($this->_feedSamplePath.'/language/plain/dc10/rss090.xml')
  1406. );
  1407. $this->assertEquals('en-GB', $feed->getLanguage());
  1408. }
  1409. // DC 1.1
  1410. public function testGetsLanguageFromRss20_Dc11()
  1411. {
  1412. $feed = Zend_Feed_Reader::importString(
  1413. file_get_contents($this->_feedSamplePath.'/language/plain/dc11/rss20.xml')
  1414. );
  1415. $this->assertEquals('en-GB', $feed->getLanguage());
  1416. }
  1417. public function testGetsLanguageFromRss094_Dc11()
  1418. {
  1419. $feed = Zend_Feed_Reader::importString(
  1420. file_get_contents($this->_feedSamplePath.'/language/plain/dc11/rss094.xml')
  1421. );
  1422. $this->assertEquals('en-GB', $feed->getLanguage());
  1423. }
  1424. public function testGetsLanguageFromRss093_Dc11()
  1425. {
  1426. $feed = Zend_Feed_Reader::importString(
  1427. file_get_contents($this->_feedSamplePath.'/language/plain/dc11/rss093.xml')
  1428. );
  1429. $this->assertEquals('en-GB', $feed->getLanguage());
  1430. }
  1431. public function testGetsLanguageFromRss092_Dc11()
  1432. {
  1433. $feed = Zend_Feed_Reader::importString(
  1434. file_get_contents($this->_feedSamplePath.'/language/plain/dc11/rss092.xml')
  1435. );
  1436. $this->assertEquals('en-GB', $feed->getLanguage());
  1437. }
  1438. public function testGetsLanguageFromRss091_Dc11()
  1439. {
  1440. $feed = Zend_Feed_Reader::importString(
  1441. file_get_contents($this->_feedSamplePath.'/language/plain/dc11/rss091.xml')
  1442. );
  1443. $this->assertEquals('en-GB', $feed->getLanguage());
  1444. }
  1445. public function testGetsLanguageFromRss10_Dc11()
  1446. {
  1447. $feed = Zend_Feed_Reader::importString(
  1448. file_get_contents($this->_feedSamplePath.'/language/plain/dc11/rss10.xml')
  1449. );
  1450. $this->assertEquals('en-GB', $feed->getLanguage());
  1451. }
  1452. public function testGetsLanguageFromRss090_Dc11()
  1453. {
  1454. $feed = Zend_Feed_Reader::importString(
  1455. file_get_contents($this->_feedSamplePath.'/language/plain/dc11/rss090.xml')
  1456. );
  1457. $this->assertEquals('en-GB', $feed->getLanguage());
  1458. }
  1459. // Other
  1460. public function testGetsLanguageFromRss10_XmlLang()
  1461. {
  1462. $feed = Zend_Feed_Reader::importString(
  1463. file_get_contents($this->_feedSamplePath.'/language/plain/rdf/rss10.xml')
  1464. );
  1465. $this->assertEquals('en', $feed->getLanguage());
  1466. }
  1467. // Missing Language
  1468. public function testGetsLanguageFromRss20_None()
  1469. {
  1470. $feed = Zend_Feed_Reader::importString(
  1471. file_get_contents($this->_feedSamplePath.'/language/plain/none/rss20.xml')
  1472. );
  1473. $this->assertEquals(null, $feed->getLanguage());
  1474. }
  1475. public function testGetsLanguageFromRss094_None()
  1476. {
  1477. $feed = Zend_Feed_Reader::importString(
  1478. file_get_contents($this->_feedSamplePath.'/language/plain/none/rss094.xml')
  1479. );
  1480. $this->assertEquals(null, $feed->getLanguage());
  1481. }
  1482. public function testGetsLanguageFromRss093_None()
  1483. {
  1484. $feed = Zend_Feed_Reader::importString(
  1485. file_get_contents($this->_feedSamplePath.'/language/plain/none/rss093.xml')
  1486. );
  1487. $this->assertEquals(null, $feed->getLanguage());
  1488. }
  1489. public function testGetsLanguageFromRss092_None()
  1490. {
  1491. $feed = Zend_Feed_Reader::importString(
  1492. file_get_contents($this->_feedSamplePath.'/language/plain/none/rss092.xml')
  1493. );
  1494. $this->assertEquals(null, $feed->getLanguage());
  1495. }
  1496. public function testGetsLanguageFromRss091_None()
  1497. {
  1498. $feed = Zend_Feed_Reader::importString(
  1499. file_get_contents($this->_feedSamplePath.'/language/plain/none/rss091.xml')
  1500. );
  1501. $this->assertEquals(null, $feed->getLanguage());
  1502. }
  1503. public function testGetsLanguageFromRss10_None()
  1504. {
  1505. $feed = Zend_Feed_Reader::importString(
  1506. file_get_contents($this->_feedSamplePath.'/language/plain/none/rss10.xml')
  1507. );
  1508. $this->assertEquals(null, $feed->getLanguage());
  1509. }
  1510. public function testGetsLanguageFromRss090_None()
  1511. {
  1512. $feed = Zend_Feed_Reader::importString(
  1513. file_get_contents($this->_feedSamplePath.'/language/plain/none/rss090.xml')
  1514. );
  1515. $this->assertEquals(null, $feed->getLanguage());
  1516. }
  1517. /**
  1518. * Get Link (Unencoded Text)
  1519. */
  1520. public function testGetsLinkFromRss20()
  1521. {
  1522. $feed = Zend_Feed_Reader::importString(
  1523. file_get_contents($this->_feedSamplePath.'/link/plain/rss20.xml')
  1524. );
  1525. $this->assertEquals('http://www.example.com', $feed->getLink());
  1526. }
  1527. public function testGetsLinkFromRss094()
  1528. {
  1529. $feed = Zend_Feed_Reader::importString(
  1530. file_get_contents($this->_feedSamplePath.'/link/plain/rss094.xml')
  1531. );
  1532. $this->assertEquals('http://www.example.com', $feed->getLink());
  1533. }
  1534. public function testGetsLinkFromRss093()
  1535. {
  1536. $feed = Zend_Feed_Reader::importString(
  1537. file_get_contents($this->_feedSamplePath.'/link/plain/rss093.xml')
  1538. );
  1539. $this->assertEquals('http://www.example.com', $feed->getLink());
  1540. }
  1541. public function testGetsLinkFromRss092()
  1542. {
  1543. $feed = Zend_Feed_Reader::importString(
  1544. file_get_contents($this->_feedSamplePath.'/link/plain/rss092.xml')
  1545. );
  1546. $this->assertEquals('http://www.example.com', $feed->getLink());
  1547. }
  1548. public function testGetsLinkFromRss091()
  1549. {
  1550. $feed = Zend_Feed_Reader::importString(
  1551. file_get_contents($this->_feedSamplePath.'/link/plain/rss091.xml')
  1552. );
  1553. $this->assertEquals('http://www.example.com', $feed->getLink());
  1554. }
  1555. public function testGetsLinkFromRss10()
  1556. {
  1557. $feed = Zend_Feed_Reader::importString(
  1558. file_get_contents($this->_feedSamplePath.'/link/plain/rss10.xml')
  1559. );
  1560. $this->assertEquals('http://www.example.com', $feed->getLink());
  1561. }
  1562. public function testGetsLinkFromRss090()
  1563. {
  1564. $feed = Zend_Feed_Reader::importString(
  1565. file_get_contents($this->_feedSamplePath.'/link/plain/rss090.xml')
  1566. );
  1567. $this->assertEquals('http://www.example.com', $feed->getLink());
  1568. }
  1569. // Missing Link
  1570. public function testGetsLinkFromRss20_None()
  1571. {
  1572. $feed = Zend_Feed_Reader::importString(
  1573. file_get_contents($this->_feedSamplePath.'/link/plain/none/rss20.xml')
  1574. );
  1575. $this->assertEquals(null, $feed->getLink());
  1576. }
  1577. public function testGetsLinkFromRss094_None()
  1578. {
  1579. $feed = Zend_Feed_Reader::importString(
  1580. file_get_contents($this->_feedSamplePath.'/link/plain/none/rss094.xml')
  1581. );
  1582. $this->assertEquals(null, $feed->getLink());
  1583. }
  1584. public function testGetsLinkFromRss093_None()
  1585. {
  1586. $feed = Zend_Feed_Reader::importString(
  1587. file_get_contents($this->_feedSamplePath.'/link/plain/none/rss093.xml')
  1588. );
  1589. $this->assertEquals(null, $feed->getLink());
  1590. }
  1591. public function testGetsLinkFromRss092_None()
  1592. {
  1593. $feed = Zend_Feed_Reader::importString(
  1594. file_get_contents($this->_feedSamplePath.'/link/plain/none/rss092.xml')
  1595. );
  1596. $this->assertEquals(null, $feed->getLink());
  1597. }
  1598. public function testGetsLinkFromRss091_None()
  1599. {
  1600. $feed = Zend_Feed_Reader::importString(
  1601. file_get_contents($this->_feedSamplePath.'/link/plain/none/rss091.xml')
  1602. );
  1603. $this->assertEquals(null, $feed->getLink());
  1604. }
  1605. public function testGetsLinkFromRss10_None()
  1606. {
  1607. $feed = Zend_Feed_Reader::importString(
  1608. file_get_contents($this->_feedSamplePath.'/link/plain/none/rss10.xml')
  1609. );
  1610. $this->assertEquals(null, $feed->getLink());
  1611. }
  1612. public function testGetsLinkFromRss090_None()
  1613. {
  1614. $feed = Zend_Feed_Reader::importString(
  1615. file_get_contents($this->_feedSamplePath.'/link/plain/none/rss090.xml')
  1616. );
  1617. $this->assertEquals(null, $feed->getLink());
  1618. }
  1619. /**
  1620. * Implements Countable
  1621. */
  1622. public function testCountableInterface()
  1623. {
  1624. $feed = Zend_Feed_Reader::importString(
  1625. file_get_contents($this->_feedSamplePath.'/link/plain/none/rss090.xml')
  1626. );
  1627. $this->assertEquals(0, count($feed));
  1628. }
  1629. /**
  1630. * Get Feed Link (Unencoded Text)
  1631. */
  1632. public function testGetsFeedLinkFromRss20()
  1633. {
  1634. $feed = Zend_Feed_Reader::importString(
  1635. file_get_contents($this->_feedSamplePath.'/feedlink/plain/rss20.xml')
  1636. );
  1637. $this->assertEquals('http://www.example.com/feed/rss', $feed->getFeedLink());
  1638. }
  1639. public function testGetsFeedLinkFromRss094()
  1640. {
  1641. $feed = Zend_Feed_Reader::importString(
  1642. file_get_contents($this->_feedSamplePath.'/feedlink/plain/rss094.xml')
  1643. );
  1644. $this->assertEquals('http://www.example.com/feed/rss', $feed->getFeedLink());
  1645. }
  1646. public function testGetsFeedLinkFromRss093()
  1647. {
  1648. $feed = Zend_Feed_Reader::importString(
  1649. file_get_contents($this->_feedSamplePath.'/feedlink/plain/rss093.xml')
  1650. );
  1651. $this->assertEquals('http://www.example.com/feed/rss', $feed->getFeedLink());
  1652. }
  1653. public function testGetsFeedLinkFromRss092()
  1654. {
  1655. $feed = Zend_Feed_Reader::importString(
  1656. file_get_contents($this->_feedSamplePath.'/feedlink/plain/rss092.xml')
  1657. );
  1658. $this->assertEquals('http://www.example.com/feed/rss', $feed->getFeedLink());
  1659. }
  1660. public function testGetsFeedLinkFromRss091()
  1661. {
  1662. $feed = Zend_Feed_Reader::importString(
  1663. file_get_contents($this->_feedSamplePath.'/feedlink/plain/rss091.xml')
  1664. );
  1665. $this->assertEquals('http://www.example.com/feed/rss', $feed->getFeedLink());
  1666. }
  1667. public function testGetsFeedLinkFromRss10()
  1668. {
  1669. $feed = Zend_Feed_Reader::importString(
  1670. file_get_contents($this->_feedSamplePath.'/feedlink/plain/rss10.xml')
  1671. );
  1672. $this->assertEquals('http://www.example.com/feed/rss', $feed->getFeedLink());
  1673. }
  1674. public function testGetsFeedLinkFromRss090()
  1675. {
  1676. $feed = Zend_Feed_Reader::importString(
  1677. file_get_contents($this->_feedSamplePath.'/feedlink/plain/rss090.xml')
  1678. );
  1679. $this->assertEquals('http://www.example.com/feed/rss', $feed->getFeedLink());
  1680. }
  1681. // Missing Feed Link
  1682. public function testGetsFeedLinkFromRss20_None()
  1683. {
  1684. $feed = Zend_Feed_Reader::importString(
  1685. file_get_contents($this->_feedSamplePath.'/feedlink/plain/none/rss20.xml')
  1686. );
  1687. $this->assertEquals(null, $feed->getFeedLink());
  1688. }
  1689. public function testGetsFeedLinkFromRss094_None()
  1690. {
  1691. $feed = Zend_Feed_Reader::importString(
  1692. file_get_contents($this->_feedSamplePath.'/feedlink/plain/none/rss094.xml')
  1693. );
  1694. $this->assertEquals(null, $feed->getFeedLink());
  1695. }
  1696. public function testGetsFeedLinkFromRss093_None()
  1697. {
  1698. $feed = Zend_Feed_Reader::importString(
  1699. file_get_contents($this->_feedSamplePath.'/feedlink/plain/none/rss093.xml')
  1700. );
  1701. $this->assertEquals(null, $feed->getFeedLink());
  1702. }
  1703. public function testGetsFeedLinkFromRss092_None()
  1704. {
  1705. $feed = Zend_Feed_Reader::importString(
  1706. file_get_contents($this->_feedSamplePath.'/feedlink/plain/none/rss092.xml')
  1707. );
  1708. $this->assertEquals(null, $feed->getFeedLink());
  1709. }
  1710. public function testGetsFeedLinkFromRss091_None()
  1711. {
  1712. $feed = Zend_Feed_Reader::importString(
  1713. file_get_contents($this->_feedSamplePath.'/feedlink/plain/none/rss091.xml')
  1714. );
  1715. $this->assertEquals(null, $feed->getFeedLink());
  1716. }
  1717. public function testGetsFeedLinkFromRss10_None()
  1718. {
  1719. $feed = Zend_Feed_Reader::importString(
  1720. file_get_contents($this->_feedSamplePath.'/feedlink/plain/none/rss10.xml')
  1721. );
  1722. $this->assertEquals(null, $feed->getFeedLink());
  1723. }
  1724. public function testGetsFeedLinkFromRss090_None()
  1725. {
  1726. $feed = Zend_Feed_Reader::importString(
  1727. file_get_contents($this->_feedSamplePath.'/feedlink/plain/none/rss090.xml')
  1728. );
  1729. $this->assertEquals(null, $feed->getFeedLink());
  1730. }
  1731. /**
  1732. * Get Generator (Unencoded Text)
  1733. */
  1734. public function testGetsGeneratorFromRss20()
  1735. {
  1736. $feed = Zend_Feed_Reader::importString(
  1737. file_get_contents($this->_feedSamplePath.'/generator/plain/rss20.xml')
  1738. );
  1739. $this->assertEquals('Zend_Feed_Writer', $feed->getGenerator());
  1740. }
  1741. public function testGetsGeneratorFromRss094()
  1742. {
  1743. $feed = Zend_Feed_Reader::importString(
  1744. file_get_contents($this->_feedSamplePath.'/generator/plain/rss094.xml')
  1745. );
  1746. $this->assertEquals('Zend_Feed_Writer', $feed->getGenerator());
  1747. }
  1748. public function testGetsGeneratorFromRss093()
  1749. {
  1750. $feed = Zend_Feed_Reader::importString(
  1751. file_get_contents($this->_feedSamplePath.'/generator/plain/rss093.xml')
  1752. );
  1753. $this->assertEquals('Zend_Feed_Writer', $feed->getGenerator());
  1754. }
  1755. public function testGetsGeneratorFromRss092()
  1756. {
  1757. $feed = Zend_Feed_Reader::importString(
  1758. file_get_contents($this->_feedSamplePath.'/generator/plain/rss092.xml')
  1759. );
  1760. $this->assertEquals('Zend_Feed_Writer', $feed->getGenerator());
  1761. }
  1762. public function testGetsGeneratorFromRss091()
  1763. {
  1764. $feed = Zend_Feed_Reader::importString(
  1765. file_get_contents($this->_feedSamplePath.'/generator/plain/rss091.xml')
  1766. );
  1767. $this->assertEquals('Zend_Feed_Writer', $feed->getGenerator());
  1768. }
  1769. public function testGetsGeneratorFromRss10()
  1770. {
  1771. $feed = Zend_Feed_Reader::importString(
  1772. file_get_contents($this->_feedSamplePath.'/generator/plain/rss10.xml')
  1773. );
  1774. $this->assertEquals('Zend_Feed_Writer', $feed->getGenerator());
  1775. }
  1776. public function testGetsGeneratorFromRss090()
  1777. {
  1778. $feed = Zend_Feed_Reader::importString(
  1779. file_get_contents($this->_feedSamplePath.'/generator/plain/rss090.xml')
  1780. );
  1781. $this->assertEquals('Zend_Feed_Writer', $feed->getGenerator());
  1782. }
  1783. // Missing Generator
  1784. public function testGetsGeneratorFromRss20_None()
  1785. {
  1786. $feed = Zend_Feed_Reader::importString(
  1787. file_get_contents($this->_feedSamplePath.'/generator/plain/none/rss20.xml')
  1788. );
  1789. $this->assertEquals(null, $feed->getGenerator());
  1790. }
  1791. public function testGetsGeneratorFromRss094_None()
  1792. {
  1793. $feed = Zend_Feed_Reader::importString(
  1794. file_get_contents($this->_feedSamplePath.'/generator/plain/none/rss094.xml')
  1795. );
  1796. $this->assertEquals(null, $feed->getGenerator());
  1797. }
  1798. public function testGetsGeneratorFromRss093_None()
  1799. {
  1800. $feed = Zend_Feed_Reader::importString(
  1801. file_get_contents($this->_feedSamplePath.'/generator/plain/none/rss093.xml')
  1802. );
  1803. $this->assertEquals(null, $feed->getGenerator());
  1804. }
  1805. public function testGetsGeneratorFromRss092_None()
  1806. {
  1807. $feed = Zend_Feed_Reader::importString(
  1808. file_get_contents($this->_feedSamplePath.'/generator/plain/none/rss092.xml')
  1809. );
  1810. $this->assertEquals(null, $feed->getGenerator());
  1811. }
  1812. public function testGetsGeneratorFromRss091_None()
  1813. {
  1814. $feed = Zend_Feed_Reader::importString(
  1815. file_get_contents($this->_feedSamplePath.'/generator/plain/none/rss091.xml')
  1816. );
  1817. $this->assertEquals(null, $feed->getGenerator());
  1818. }
  1819. public function testGetsGeneratorFromRss10_None()
  1820. {
  1821. $feed = Zend_Feed_Reader::importString(
  1822. file_get_contents($this->_feedSamplePath.'/generator/plain/none/rss10.xml')
  1823. );
  1824. $this->assertEquals(null, $feed->getGenerator());
  1825. }
  1826. public function testGetsGeneratorFromRss090_None()
  1827. {
  1828. $feed = Zend_Feed_Reader::importString(
  1829. file_get_contents($this->_feedSamplePath.'/generator/plain/none/rss090.xml')
  1830. );
  1831. $this->assertEquals(null, $feed->getGenerator());
  1832. }
  1833. /**
  1834. * Get Date Modified (Unencoded Text)
  1835. */
  1836. public function testGetsDateModifiedFromRss20()
  1837. {
  1838. $feed = Zend_Feed_Reader::importString(
  1839. file_get_contents($this->_feedSamplePath.'/datemodified/plain/rss20.xml')
  1840. );
  1841. $edate = new Zend_Date;
  1842. $edate->set('2009-03-07T08:03:50Z', Zend_Date::ISO_8601);
  1843. $this->assertTrue($edate->equals($feed->getDateModified()));
  1844. }
  1845. // DC 1.0
  1846. public function testGetsDateModifiedFromRss20_Dc10()
  1847. {
  1848. $feed = Zend_Feed_Reader::importString(
  1849. file_get_contents($this->_feedSamplePath.'/datemodified/plain/dc10/rss20.xml')
  1850. );
  1851. $edate = new Zend_Date;
  1852. $edate->set('2009-03-07T08:03:50Z', Zend_Date::ISO_8601);
  1853. $this->assertTrue($edate->equals($feed->getDateModified()));
  1854. }
  1855. public function testGetsDateModifiedFromRss094_Dc10()
  1856. {
  1857. $feed = Zend_Feed_Reader::importString(
  1858. file_get_contents($this->_feedSamplePath.'/datemodified/plain/dc10/rss094.xml')
  1859. );
  1860. $edate = new Zend_Date;
  1861. $edate->set('2009-03-07T08:03:50Z', Zend_Date::ISO_8601);
  1862. $this->assertTrue($edate->equals($feed->getDateModified()));
  1863. }
  1864. public function testGetsDateModifiedFromRss093_Dc10()
  1865. {
  1866. $feed = Zend_Feed_Reader::importString(
  1867. file_get_contents($this->_feedSamplePath.'/datemodified/plain/dc10/rss093.xml')
  1868. );
  1869. $edate = new Zend_Date;
  1870. $edate->set('2009-03-07T08:03:50Z', Zend_Date::ISO_8601);
  1871. $this->assertTrue($edate->equals($feed->getDateModified()));
  1872. }
  1873. public function testGetsDateModifiedFromRss092_Dc10()
  1874. {
  1875. $feed = Zend_Feed_Reader::importString(
  1876. file_get_contents($this->_feedSamplePath.'/datemodified/plain/dc10/rss092.xml')
  1877. );
  1878. $edate = new Zend_Date;
  1879. $edate->set('2009-03-07T08:03:50Z', Zend_Date::ISO_8601);
  1880. $this->assertTrue($edate->equals($feed->getDateModified()));
  1881. }
  1882. public function testGetsDateModifiedFromRss091_Dc10()
  1883. {
  1884. $feed = Zend_Feed_Reader::importString(
  1885. file_get_contents($this->_feedSamplePath.'/datemodified/plain/dc10/rss091.xml')
  1886. );
  1887. $edate = new Zend_Date;
  1888. $edate->set('2009-03-07T08:03:50Z', Zend_Date::ISO_8601);
  1889. $this->assertTrue($edate->equals($feed->getDateModified()));
  1890. }
  1891. public function testGetsDateModifiedFromRss10_Dc10()
  1892. {
  1893. $feed = Zend_Feed_Reader::importString(
  1894. file_get_contents($this->_feedSamplePath.'/datemodified/plain/dc10/rss10.xml')
  1895. );
  1896. $edate = new Zend_Date;
  1897. $edate->set('2009-03-07T08:03:50Z', Zend_Date::ISO_8601);
  1898. $this->assertTrue($edate->equals($feed->getDateModified()));
  1899. }
  1900. public function testGetsDateModifiedFromRss090_Dc10()
  1901. {
  1902. $feed = Zend_Feed_Reader::importString(
  1903. file_get_contents($this->_feedSamplePath.'/datemodified/plain/dc10/rss090.xml')
  1904. );
  1905. $edate = new Zend_Date;
  1906. $edate->set('2009-03-07T08:03:50Z', Zend_Date::ISO_8601);
  1907. $this->assertTrue($edate->equals($feed->getDateModified()));
  1908. }
  1909. // DC 1.1
  1910. public function testGetsDateModifiedFromRss20_Dc11()
  1911. {
  1912. $feed = Zend_Feed_Reader::importString(
  1913. file_get_contents($this->_feedSamplePath.'/datemodified/plain/dc11/rss20.xml')
  1914. );
  1915. $edate = new Zend_Date;
  1916. $edate->set('2009-03-07T08:03:50Z', Zend_Date::ISO_8601);
  1917. $this->assertTrue($edate->equals($feed->getDateModified()));
  1918. }
  1919. public function testGetsDateModifiedFromRss094_Dc11()
  1920. {
  1921. $feed = Zend_Feed_Reader::importString(
  1922. file_get_contents($this->_feedSamplePath.'/datemodified/plain/dc11/rss094.xml')
  1923. );
  1924. $edate = new Zend_Date;
  1925. $edate->set('2009-03-07T08:03:50Z', Zend_Date::ISO_8601);
  1926. $this->assertTrue($edate->equals($feed->getDateModified()));
  1927. }
  1928. public function testGetsDateModifiedFromRss093_Dc11()
  1929. {
  1930. $feed = Zend_Feed_Reader::importString(
  1931. file_get_contents($this->_feedSamplePath.'/datemodified/plain/dc11/rss093.xml')
  1932. );
  1933. $edate = new Zend_Date;
  1934. $edate->set('2009-03-07T08:03:50Z', Zend_Date::ISO_8601);
  1935. $this->assertTrue($edate->equals($feed->getDateModified()));
  1936. }
  1937. public function testGetsDateModifiedFromRss092_Dc11()
  1938. {
  1939. $feed = Zend_Feed_Reader::importString(
  1940. file_get_contents($this->_feedSamplePath.'/datemodified/plain/dc11/rss092.xml')
  1941. );
  1942. $edate = new Zend_Date;
  1943. $edate->set('2009-03-07T08:03:50Z', Zend_Date::ISO_8601);
  1944. $this->assertTrue($edate->equals($feed->getDateModified()));
  1945. }
  1946. public function testGetsDateModifiedFromRss091_Dc11()
  1947. {
  1948. $feed = Zend_Feed_Reader::importString(
  1949. file_get_contents($this->_feedSamplePath.'/datemodified/plain/dc11/rss091.xml')
  1950. );
  1951. $edate = new Zend_Date;
  1952. $edate->set('2009-03-07T08:03:50Z', Zend_Date::ISO_8601);
  1953. $this->assertTrue($edate->equals($feed->getDateModified()));
  1954. }
  1955. public function testGetsDateModifiedFromRss10_Dc11()
  1956. {
  1957. $feed = Zend_Feed_Reader::importString(
  1958. file_get_contents($this->_feedSamplePath.'/datemodified/plain/dc11/rss10.xml')
  1959. );
  1960. $edate = new Zend_Date;
  1961. $edate->set('2009-03-07T08:03:50Z', Zend_Date::ISO_8601);
  1962. $this->assertTrue($edate->equals($feed->getDateModified()));
  1963. }
  1964. public function testGetsDateModifiedFromRss090_Dc11()
  1965. {
  1966. $feed = Zend_Feed_Reader::importString(
  1967. file_get_contents($this->_feedSamplePath.'/datemodified/plain/dc11/rss090.xml')
  1968. );
  1969. $edate = new Zend_Date;
  1970. $edate->set('2009-03-07T08:03:50Z', Zend_Date::ISO_8601);
  1971. $this->assertTrue($edate->equals($feed->getDateModified()));
  1972. }
  1973. // Atom 1.0
  1974. public function testGetsDateModifiedFromRss20_atom10()
  1975. {
  1976. $feed = Zend_Feed_Reader::importString(
  1977. file_get_contents($this->_feedSamplePath.'/datemodified/plain/atom10/rss20.xml')
  1978. );
  1979. $edate = new Zend_Date;
  1980. $edate->set('2009-03-07T08:03:50Z', Zend_Date::ISO_8601);
  1981. $this->assertTrue($edate->equals($feed->getDateModified()));
  1982. }
  1983. public function testGetsDateModifiedFromRss094_atom10()
  1984. {
  1985. $feed = Zend_Feed_Reader::importString(
  1986. file_get_contents($this->_feedSamplePath.'/datemodified/plain/atom10/rss094.xml')
  1987. );
  1988. $edate = new Zend_Date;
  1989. $edate->set('2009-03-07T08:03:50Z', Zend_Date::ISO_8601);
  1990. $this->assertTrue($edate->equals($feed->getDateModified()));
  1991. }
  1992. public function testGetsDateModifiedFromRss093_atom10()
  1993. {
  1994. $feed = Zend_Feed_Reader::importString(
  1995. file_get_contents($this->_feedSamplePath.'/datemodified/plain/atom10/rss093.xml')
  1996. );
  1997. $edate = new Zend_Date;
  1998. $edate->set('2009-03-07T08:03:50Z', Zend_Date::ISO_8601);
  1999. $this->assertTrue($edate->equals($feed->getDateModified()));
  2000. }
  2001. public function testGetsDateModifiedFromRss092_atom10()
  2002. {
  2003. $feed = Zend_Feed_Reader::importString(
  2004. file_get_contents($this->_feedSamplePath.'/datemodified/plain/atom10/rss092.xml')
  2005. );
  2006. $edate = new Zend_Date;
  2007. $edate->set('2009-03-07T08:03:50Z', Zend_Date::ISO_8601);
  2008. $this->assertTrue($edate->equals($feed->getDateModified()));
  2009. }
  2010. public function testGetsDateModifiedFromRss091_atom10()
  2011. {
  2012. $feed = Zend_Feed_Reader::importString(
  2013. file_get_contents($this->_feedSamplePath.'/datemodified/plain/atom10/rss091.xml')
  2014. );
  2015. $edate = new Zend_Date;
  2016. $edate->set('2009-03-07T08:03:50Z', Zend_Date::ISO_8601);
  2017. $this->assertTrue($edate->equals($feed->getDateModified()));
  2018. }
  2019. public function testGetsDateModifiedFromRss10_atom10()
  2020. {
  2021. $feed = Zend_Feed_Reader::importString(
  2022. file_get_contents($this->_feedSamplePath.'/datemodified/plain/atom10/rss10.xml')
  2023. );
  2024. $edate = new Zend_Date;
  2025. $edate->set('2009-03-07T08:03:50Z', Zend_Date::ISO_8601);
  2026. $this->assertTrue($edate->equals($feed->getDateModified()));
  2027. }
  2028. public function testGetsDateModifiedFromRss090_atom10()
  2029. {
  2030. $feed = Zend_Feed_Reader::importString(
  2031. file_get_contents($this->_feedSamplePath.'/datemodified/plain/atom10/rss090.xml')
  2032. );
  2033. $edate = new Zend_Date;
  2034. $edate->set('2009-03-07T08:03:50Z', Zend_Date::ISO_8601);
  2035. $this->assertTrue($edate->equals($feed->getDateModified()));
  2036. }
  2037. // Missing DateModified
  2038. public function testGetsDateModifiedFromRss20_None()
  2039. {
  2040. $feed = Zend_Feed_Reader::importString(
  2041. file_get_contents($this->_feedSamplePath.'/datemodified/plain/none/rss20.xml')
  2042. );
  2043. $this->assertEquals(null, $feed->getDateModified());
  2044. }
  2045. public function testGetsDateModifiedFromRss094_None()
  2046. {
  2047. $feed = Zend_Feed_Reader::importString(
  2048. file_get_contents($this->_feedSamplePath.'/datemodified/plain/none/rss094.xml')
  2049. );
  2050. $this->assertEquals(null, $feed->getDateModified());
  2051. }
  2052. public function testGetsDateModifiedFromRss093_None()
  2053. {
  2054. $feed = Zend_Feed_Reader::importString(
  2055. file_get_contents($this->_feedSamplePath.'/datemodified/plain/none/rss093.xml')
  2056. );
  2057. $this->assertEquals(null, $feed->getDateModified());
  2058. }
  2059. public function testGetsDateModifiedFromRss092_None()
  2060. {
  2061. $feed = Zend_Feed_Reader::importString(
  2062. file_get_contents($this->_feedSamplePath.'/datemodified/plain/none/rss092.xml')
  2063. );
  2064. $this->assertEquals(null, $feed->getDateModified());
  2065. }
  2066. public function testGetsDateModifiedFromRss091_None()
  2067. {
  2068. $feed = Zend_Feed_Reader::importString(
  2069. file_get_contents($this->_feedSamplePath.'/datemodified/plain/none/rss091.xml')
  2070. );
  2071. $this->assertEquals(null, $feed->getDateModified());
  2072. }
  2073. public function testGetsDateModifiedFromRss10_None()
  2074. {
  2075. $feed = Zend_Feed_Reader::importString(
  2076. file_get_contents($this->_feedSamplePath.'/datemodified/plain/none/rss10.xml')
  2077. );
  2078. $this->assertEquals(null, $feed->getDateModified());
  2079. }
  2080. public function testGetsDateModifiedFromRss090_None()
  2081. {
  2082. $feed = Zend_Feed_Reader::importString(
  2083. file_get_contents($this->_feedSamplePath.'/datemodified/plain/none/rss090.xml')
  2084. );
  2085. $this->assertEquals(null, $feed->getDateModified());
  2086. }
  2087. /**
  2088. * Get Hubs (Unencoded Text)
  2089. */
  2090. public function testGetsHubsFromRss20()
  2091. {
  2092. $feed = Zend_Feed_Reader::importString(
  2093. file_get_contents($this->_feedSamplePath.'/hubs/plain/atom10/rss20.xml')
  2094. );
  2095. $this->assertEquals(array(
  2096. 'http://www.example.com/hub1',
  2097. 'http://www.example.com/hub2'
  2098. ), $feed->getHubs());
  2099. }
  2100. public function testGetsHubsFromRss094()
  2101. {
  2102. $feed = Zend_Feed_Reader::importString(
  2103. file_get_contents($this->_feedSamplePath.'/hubs/plain/atom10/rss094.xml')
  2104. );
  2105. $this->assertEquals(array(
  2106. 'http://www.example.com/hub1',
  2107. 'http://www.example.com/hub2'
  2108. ), $feed->getHubs());
  2109. }
  2110. public function testGetsHubsFromRss093()
  2111. {
  2112. $feed = Zend_Feed_Reader::importString(
  2113. file_get_contents($this->_feedSamplePath.'/hubs/plain/atom10/rss093.xml')
  2114. );
  2115. $this->assertEquals(array(
  2116. 'http://www.example.com/hub1',
  2117. 'http://www.example.com/hub2'
  2118. ), $feed->getHubs());
  2119. }
  2120. public function testGetsHubsFromRss092()
  2121. {
  2122. $feed = Zend_Feed_Reader::importString(
  2123. file_get_contents($this->_feedSamplePath.'/hubs/plain/atom10/rss092.xml')
  2124. );
  2125. $this->assertEquals(array(
  2126. 'http://www.example.com/hub1',
  2127. 'http://www.example.com/hub2'
  2128. ), $feed->getHubs());
  2129. }
  2130. public function testGetsHubsFromRss091()
  2131. {
  2132. $feed = Zend_Feed_Reader::importString(
  2133. file_get_contents($this->_feedSamplePath.'/hubs/plain/atom10/rss091.xml')
  2134. );
  2135. $this->assertEquals(array(
  2136. 'http://www.example.com/hub1',
  2137. 'http://www.example.com/hub2'
  2138. ), $feed->getHubs());
  2139. }
  2140. public function testGetsHubsFromRss10()
  2141. {
  2142. $feed = Zend_Feed_Reader::importString(
  2143. file_get_contents($this->_feedSamplePath.'/hubs/plain/atom10/rss10.xml')
  2144. );
  2145. $this->assertEquals(array(
  2146. 'http://www.example.com/hub1',
  2147. 'http://www.example.com/hub2'
  2148. ), $feed->getHubs());
  2149. }
  2150. public function testGetsHubsFromRss090()
  2151. {
  2152. $feed = Zend_Feed_Reader::importString(
  2153. file_get_contents($this->_feedSamplePath.'/hubs/plain/atom10/rss090.xml')
  2154. );
  2155. $this->assertEquals(array(
  2156. 'http://www.example.com/hub1',
  2157. 'http://www.example.com/hub2'
  2158. ), $feed->getHubs());
  2159. }
  2160. // Missing Hubs
  2161. public function testGetsHubsFromRss20_None()
  2162. {
  2163. $feed = Zend_Feed_Reader::importString(
  2164. file_get_contents($this->_feedSamplePath.'/hubs/plain/none/rss20.xml')
  2165. );
  2166. $this->assertEquals(null, $feed->getHubs());
  2167. }
  2168. public function testGetsHubsFromRss094_None()
  2169. {
  2170. $feed = Zend_Feed_Reader::importString(
  2171. file_get_contents($this->_feedSamplePath.'/hubs/plain/none/rss094.xml')
  2172. );
  2173. $this->assertEquals(null, $feed->getHubs());
  2174. }
  2175. public function testGetsHubsFromRss093_None()
  2176. {
  2177. $feed = Zend_Feed_Reader::importString(
  2178. file_get_contents($this->_feedSamplePath.'/hubs/plain/none/rss093.xml')
  2179. );
  2180. $this->assertEquals(null, $feed->getHubs());
  2181. }
  2182. public function testGetsHubsFromRss092_None()
  2183. {
  2184. $feed = Zend_Feed_Reader::importString(
  2185. file_get_contents($this->_feedSamplePath.'/hubs/plain/none/rss092.xml')
  2186. );
  2187. $this->assertEquals(null, $feed->getHubs());
  2188. }
  2189. public function testGetsHubsFromRss091_None()
  2190. {
  2191. $feed = Zend_Feed_Reader::importString(
  2192. file_get_contents($this->_feedSamplePath.'/hubs/plain/none/rss091.xml')
  2193. );
  2194. $this->assertEquals(null, $feed->getHubs());
  2195. }
  2196. public function testGetsHubsFromRss10_None()
  2197. {
  2198. $feed = Zend_Feed_Reader::importString(
  2199. file_get_contents($this->_feedSamplePath.'/hubs/plain/none/rss10.xml')
  2200. );
  2201. $this->assertEquals(null, $feed->getHubs());
  2202. }
  2203. public function testGetsHubsFromRss090_None()
  2204. {
  2205. $feed = Zend_Feed_Reader::importString(
  2206. file_get_contents($this->_feedSamplePath.'/hubs/plain/none/rss090.xml')
  2207. );
  2208. $this->assertEquals(null, $feed->getHubs());
  2209. }
  2210. /**
  2211. * Get category data
  2212. */
  2213. // RSS 2.0
  2214. public function testGetsCategoriesFromRss20()
  2215. {
  2216. $feed = Zend_Feed_Reader::importString(
  2217. file_get_contents($this->_feedSamplePath.'/category/plain/rss20.xml')
  2218. );
  2219. $this->assertEquals($this->_expectedCats, (array) $feed->getCategories());
  2220. $this->assertEquals(array('topic1','topic2'), array_values($feed->getCategories()->getValues()));
  2221. }
  2222. // DC 1.0
  2223. public function testGetsCategoriesFromRss090_Dc10()
  2224. {
  2225. $feed = Zend_Feed_Reader::importString(
  2226. file_get_contents($this->_feedSamplePath.'/category/plain/dc10/rss090.xml')
  2227. );
  2228. $this->assertEquals($this->_expectedCatsRdf, (array) $feed->getCategories());
  2229. $this->assertEquals(array('topic1','topic2'), array_values($feed->getCategories()->getValues()));
  2230. }
  2231. public function testGetsCategoriesFromRss091_Dc10()
  2232. {
  2233. $feed = Zend_Feed_Reader::importString(
  2234. file_get_contents($this->_feedSamplePath.'/category/plain/dc10/rss091.xml')
  2235. );
  2236. $this->assertEquals($this->_expectedCatsRdf, (array) $feed->getCategories());
  2237. $this->assertEquals(array('topic1','topic2'), array_values($feed->getCategories()->getValues()));
  2238. }
  2239. public function testGetsCategoriesFromRss092_Dc10()
  2240. {
  2241. $feed = Zend_Feed_Reader::importString(
  2242. file_get_contents($this->_feedSamplePath.'/category/plain/dc10/rss092.xml')
  2243. );
  2244. $this->assertEquals($this->_expectedCatsRdf, (array) $feed->getCategories());
  2245. $this->assertEquals(array('topic1','topic2'), array_values($feed->getCategories()->getValues()));
  2246. }
  2247. public function testGetsCategoriesFromRss093_Dc10()
  2248. {
  2249. $feed = Zend_Feed_Reader::importString(
  2250. file_get_contents($this->_feedSamplePath.'/category/plain/dc10/rss093.xml')
  2251. );
  2252. $this->assertEquals($this->_expectedCatsRdf, (array) $feed->getCategories());
  2253. $this->assertEquals(array('topic1','topic2'), array_values($feed->getCategories()->getValues()));
  2254. }
  2255. public function testGetsCategoriesFromRss094_Dc10()
  2256. {
  2257. $feed = Zend_Feed_Reader::importString(
  2258. file_get_contents($this->_feedSamplePath.'/category/plain/dc10/rss094.xml')
  2259. );
  2260. $this->assertEquals($this->_expectedCatsRdf, (array) $feed->getCategories());
  2261. $this->assertEquals(array('topic1','topic2'), array_values($feed->getCategories()->getValues()));
  2262. }
  2263. public function testGetsCategoriesFromRss10_Dc10()
  2264. {
  2265. $feed = Zend_Feed_Reader::importString(
  2266. file_get_contents($this->_feedSamplePath.'/category/plain/dc10/rss10.xml')
  2267. );
  2268. $this->assertEquals($this->_expectedCatsRdf, (array) $feed->getCategories());
  2269. $this->assertEquals(array('topic1','topic2'), array_values($feed->getCategories()->getValues()));
  2270. }
  2271. // DC 1.1
  2272. public function testGetsCategoriesFromRss090_Dc11()
  2273. {
  2274. $feed = Zend_Feed_Reader::importString(
  2275. file_get_contents($this->_feedSamplePath.'/category/plain/dc11/rss090.xml')
  2276. );
  2277. $this->assertEquals($this->_expectedCatsRdf, (array) $feed->getCategories());
  2278. $this->assertEquals(array('topic1','topic2'), array_values($feed->getCategories()->getValues()));
  2279. }
  2280. public function testGetsCategoriesFromRss091_Dc11()
  2281. {
  2282. $feed = Zend_Feed_Reader::importString(
  2283. file_get_contents($this->_feedSamplePath.'/category/plain/dc11/rss091.xml')
  2284. );
  2285. $this->assertEquals($this->_expectedCatsRdf, (array) $feed->getCategories());
  2286. $this->assertEquals(array('topic1','topic2'), array_values($feed->getCategories()->getValues()));
  2287. }
  2288. public function testGetsCategoriesFromRss092_Dc11()
  2289. {
  2290. $feed = Zend_Feed_Reader::importString(
  2291. file_get_contents($this->_feedSamplePath.'/category/plain/dc11/rss092.xml')
  2292. );
  2293. $this->assertEquals($this->_expectedCatsRdf, (array) $feed->getCategories());
  2294. $this->assertEquals(array('topic1','topic2'), array_values($feed->getCategories()->getValues()));
  2295. }
  2296. public function testGetsCategoriesFromRss093_Dc11()
  2297. {
  2298. $feed = Zend_Feed_Reader::importString(
  2299. file_get_contents($this->_feedSamplePath.'/category/plain/dc11/rss093.xml')
  2300. );
  2301. $this->assertEquals($this->_expectedCatsRdf, (array) $feed->getCategories());
  2302. $this->assertEquals(array('topic1','topic2'), array_values($feed->getCategories()->getValues()));
  2303. }
  2304. public function testGetsCategoriesFromRss094_Dc11()
  2305. {
  2306. $feed = Zend_Feed_Reader::importString(
  2307. file_get_contents($this->_feedSamplePath.'/category/plain/dc11/rss094.xml')
  2308. );
  2309. $this->assertEquals($this->_expectedCatsRdf, (array) $feed->getCategories());
  2310. $this->assertEquals(array('topic1','topic2'), array_values($feed->getCategories()->getValues()));
  2311. }
  2312. public function testGetsCategoriesFromRss10_Dc11()
  2313. {
  2314. $feed = Zend_Feed_Reader::importString(
  2315. file_get_contents($this->_feedSamplePath.'/category/plain/dc11/rss10.xml')
  2316. );
  2317. $this->assertEquals($this->_expectedCatsRdf, (array) $feed->getCategories());
  2318. $this->assertEquals(array('topic1','topic2'), array_values($feed->getCategories()->getValues()));
  2319. }
  2320. // Atom 1.0
  2321. public function testGetsCategoriesFromRss090_Atom10()
  2322. {
  2323. $feed = Zend_Feed_Reader::importString(
  2324. file_get_contents($this->_feedSamplePath.'/category/plain/atom10/rss090.xml')
  2325. );
  2326. $this->assertEquals($this->_expectedCatsAtom, (array) $feed->getCategories());
  2327. $this->assertEquals(array('topic1','Cat & Dog'), array_values($feed->getCategories()->getValues()));
  2328. }
  2329. public function testGetsCategoriesFromRss091_Atom10()
  2330. {
  2331. $feed = Zend_Feed_Reader::importString(
  2332. file_get_contents($this->_feedSamplePath.'/category/plain/atom10/rss091.xml')
  2333. );
  2334. $this->assertEquals($this->_expectedCatsAtom, (array) $feed->getCategories());
  2335. $this->assertEquals(array('topic1','Cat & Dog'), array_values($feed->getCategories()->getValues()));
  2336. }
  2337. public function testGetsCategoriesFromRss092_Atom10()
  2338. {
  2339. $feed = Zend_Feed_Reader::importString(
  2340. file_get_contents($this->_feedSamplePath.'/category/plain/atom10/rss092.xml')
  2341. );
  2342. $this->assertEquals($this->_expectedCatsAtom, (array) $feed->getCategories());
  2343. $this->assertEquals(array('topic1','Cat & Dog'), array_values($feed->getCategories()->getValues()));
  2344. }
  2345. public function testGetsCategoriesFromRss093_Atom10()
  2346. {
  2347. $feed = Zend_Feed_Reader::importString(
  2348. file_get_contents($this->_feedSamplePath.'/category/plain/atom10/rss093.xml')
  2349. );
  2350. $this->assertEquals($this->_expectedCatsAtom, (array) $feed->getCategories());
  2351. $this->assertEquals(array('topic1','Cat & Dog'), array_values($feed->getCategories()->getValues()));
  2352. }
  2353. public function testGetsCategoriesFromRss094_Atom10()
  2354. {
  2355. $feed = Zend_Feed_Reader::importString(
  2356. file_get_contents($this->_feedSamplePath.'/category/plain/atom10/rss094.xml')
  2357. );
  2358. $this->assertEquals($this->_expectedCatsAtom, (array) $feed->getCategories());
  2359. $this->assertEquals(array('topic1','Cat & Dog'), array_values($feed->getCategories()->getValues()));
  2360. }
  2361. public function testGetsCategoriesFromRss10_Atom10()
  2362. {
  2363. $feed = Zend_Feed_Reader::importString(
  2364. file_get_contents($this->_feedSamplePath.'/category/plain/atom10/rss10.xml')
  2365. );
  2366. $this->assertEquals($this->_expectedCatsAtom, (array) $feed->getCategories());
  2367. $this->assertEquals(array('topic1','Cat & Dog'), array_values($feed->getCategories()->getValues()));
  2368. }
  2369. // No Categories In Entry
  2370. public function testGetsCategoriesFromRss20_None()
  2371. {
  2372. $feed = Zend_Feed_Reader::importString(
  2373. file_get_contents($this->_feedSamplePath.'/category/plain/none/rss20.xml')
  2374. );
  2375. $this->assertEquals(array(), (array) $feed->getCategories());
  2376. $this->assertEquals(array(), array_values($feed->getCategories()->getValues()));
  2377. }
  2378. public function testGetsCategoriesFromRss090_None()
  2379. {
  2380. $feed = Zend_Feed_Reader::importString(
  2381. file_get_contents($this->_feedSamplePath.'/category/plain/none/rss090.xml')
  2382. );
  2383. $this->assertEquals(array(), (array) $feed->getCategories());
  2384. $this->assertEquals(array(), array_values($feed->getCategories()->getValues()));
  2385. }
  2386. public function testGetsCategoriesFromRss091_None()
  2387. {
  2388. $feed = Zend_Feed_Reader::importString(
  2389. file_get_contents($this->_feedSamplePath.'/category/plain/none/rss091.xml')
  2390. );
  2391. $this->assertEquals(array(), (array) $feed->getCategories());
  2392. $this->assertEquals(array(), array_values($feed->getCategories()->getValues()));
  2393. }
  2394. public function testGetsCategoriesFromRss092_None()
  2395. {
  2396. $feed = Zend_Feed_Reader::importString(
  2397. file_get_contents($this->_feedSamplePath.'/category/plain/none/rss092.xml')
  2398. );
  2399. $this->assertEquals(array(), (array) $feed->getCategories());
  2400. $this->assertEquals(array(), array_values($feed->getCategories()->getValues()));
  2401. }
  2402. public function testGetsCategoriesFromRss093_None()
  2403. {
  2404. $feed = Zend_Feed_Reader::importString(
  2405. file_get_contents($this->_feedSamplePath.'/category/plain/none/rss093.xml')
  2406. );
  2407. $this->assertEquals(array(), (array) $feed->getCategories());
  2408. $this->assertEquals(array(), array_values($feed->getCategories()->getValues()));
  2409. }
  2410. public function testGetsCategoriesFromRss094_None()
  2411. {
  2412. $feed = Zend_Feed_Reader::importString(
  2413. file_get_contents($this->_feedSamplePath.'/category/plain/none/rss094.xml')
  2414. );
  2415. $this->assertEquals(array(), (array) $feed->getCategories());
  2416. $this->assertEquals(array(), array_values($feed->getCategories()->getValues()));
  2417. }
  2418. public function testGetsCategoriesFromRss10_None()
  2419. {
  2420. $feed = Zend_Feed_Reader::importString(
  2421. file_get_contents($this->_feedSamplePath.'/category/plain/none/rss10.xml')
  2422. );
  2423. $this->assertEquals(array(), (array) $feed->getCategories());
  2424. $this->assertEquals(array(), array_values($feed->getCategories()->getValues()));
  2425. }
  2426. }