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

https://github.com/leerbag/zf2 · PHP · 1433 lines · 1197 code · 173 blank · 63 comment · 2 complexity · 3a1e1d052b9a6236096fab0f45d43439 MD5 · raw file

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