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

/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

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

  1. <?php
  2. /**
  3. * Zend Framework
  4. *
  5. * LICENSE
  6. *
  7. * This source file is subject to the new BSD license that is bundled
  8. * with this package in the file LICENSE.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://framework.zend.com/license/new-bsd
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to license@zend.com so we can send you a copy immediately.
  14. *
  15. * @category Zend
  16. * @package Zend_Feed
  17. * @subpackage UnitTests
  18. * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
  19. * @license http://framework.zend.com/license/new-bsd New BSD License
  20. * @version $Id: RssTest.php 24593 2012-01-05 20:35:02Z matthew $
  21. */
  22. require_once 'Zend/Feed/Reader.php';
  23. 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 = Zen

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