PageRenderTime 115ms CodeModel.GetById 25ms RepoModel.GetById 2ms app.codeStats 0ms

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

https://github.com/damoon/zf
PHP | 2766 lines | 2324 code | 340 blank | 102 comment | 2 complexity | a5f7726d2b3afc8257cef0f62ab35336 MD5 | raw file

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

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