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

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

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

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