PageRenderTime 54ms CodeModel.GetById 12ms RepoModel.GetById 1ms app.codeStats 0ms

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

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