Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'release'

  • Loading branch information...
commit e1db90ccdab2dcba93ef36ca2e1303ff57893aaa 2 parents 046800d + dda977b
@weierophinney weierophinney authored
Showing with 1,720 additions and 1,363 deletions.
  1. +5 −5 library/Zend/Feed/Writer/Feed.php
  2. +0 −3  library/Zend/Feed/Writer/Renderer/Feed/Rss.php
  3. +62 −62 tests/ZendTest/Feed/PubSubHubbub/PublisherTest.php
  4. +27 −27 tests/ZendTest/Feed/PubSubHubbub/SubscriberHttpTest.php
  5. +61 −61 tests/ZendTest/Feed/PubSubHubbub/SubscriberTest.php
  6. +23 −23 tests/ZendTest/Feed/Reader/Entry/AtomStandaloneEntryTest.php
  7. +46 −46 tests/ZendTest/Feed/Reader/Entry/AtomTest.php
  8. +14 −14 tests/ZendTest/Feed/Reader/Entry/CommonTest.php
  9. +306 −306 tests/ZendTest/Feed/Reader/Entry/RssTest.php
  10. +23 −23 tests/ZendTest/Feed/Reader/Feed/AtomSourceTest.php
  11. +54 −54 tests/ZendTest/Feed/Reader/Feed/AtomTest.php
  12. +12 −12 tests/ZendTest/Feed/Reader/Feed/CommonTest.php
  13. +309 −309 tests/ZendTest/Feed/Reader/Feed/RssTest.php
  14. +21 −21 tests/ZendTest/Feed/Reader/Integration/H-OnlineComAtom10Test.php
  15. +20 −20 tests/ZendTest/Feed/Reader/Integration/LautDeRdfTest.php
  16. +27 −27 tests/ZendTest/Feed/Reader/Integration/PodcastRss2Test.php
  17. +21 −21 tests/ZendTest/Feed/Reader/Integration/WordpressAtom10Test.php
  18. +21 −21 tests/ZendTest/Feed/Reader/Integration/WordpressRss2DcAtomTest.php
  19. +14 −14 tests/ZendTest/Feed/Reader/ReaderTest.php
  20. +77 −0 tests/ZendTest/Feed/Writer/DeletedTest.php
  21. +114 −6 tests/ZendTest/Feed/Writer/EntryTest.php
  22. +166 −2 tests/ZendTest/Feed/Writer/FeedTest.php
  23. +63 −63 tests/ZendTest/Feed/Writer/Renderer/Entry/AtomTest.php
  24. +68 −68 tests/ZendTest/Feed/Writer/Renderer/Entry/RssTest.php
  25. +69 −69 tests/ZendTest/Feed/Writer/Renderer/Feed/AtomTest.php
  26. +97 −86 tests/ZendTest/Feed/Writer/Renderer/Feed/RssTest.php
View
10 library/Zend/Feed/Writer/Feed.php
@@ -37,7 +37,7 @@ class Feed extends AbstractFeed implements Iterator, Countable
protected $entriesKey = 0;
/**
- * Creates a new Zend_Feed_Writer_Entry data container for use. This is NOT
+ * Creates a new Zend\Feed\Writer\Entry data container for use. This is NOT
* added to the current feed automatically, but is necessary to create a
* container with some initial values preset based on the current feed data.
*
@@ -66,7 +66,7 @@ public function addTombstone(Deleted $deleted)
}
/**
- * Creates a new Zend_Feed_Writer_Deleted data container for use. This is NOT
+ * Creates a new Zend\Feed\Writer\Deleted data container for use. This is NOT
* added to the current feed automatically, but is necessary to create a
* container with some initial values preset based on the current feed data.
*
@@ -102,10 +102,10 @@ public function addEntry(Entry $entry)
*/
public function removeEntry($index)
{
- if (isset($this->entries[$index])) {
- unset($this->entries[$index]);
+ if (!isset($this->entries[$index])) {
+ throw new Exception\InvalidArgumentException('Undefined index: ' . $index . '. Entry does not exist.');
}
- throw new Exception\InvalidArgumentException('Undefined index: ' . $index . '. Entry does not exist.');
+ unset($this->entries[$index]);
}
/**
View
3  library/Zend/Feed/Writer/Renderer/Feed/Rss.php
@@ -41,9 +41,6 @@ public function __construct (Writer\Feed $container)
*/
public function render()
{
- if (!$this->container->getEncoding()) {
- $this->container->setEncoding('UTF-8');
- }
$this->dom = new DOMDocument('1.0', $this->container->getEncoding());
$this->dom->formatOutput = true;
$this->dom->substituteEntities = false;
View
124 tests/ZendTest/Feed/PubSubHubbub/PublisherTest.php
@@ -25,13 +25,13 @@
class PublisherTest extends \PHPUnit_Framework_TestCase
{
/** @var Publisher */
- protected $_publisher = null;
+ protected $publisher = null;
public function setUp()
{
$client = new HttpClient;
PubSubHubbub::setHttpClient($client);
- $this->_publisher = new Publisher;
+ $this->publisher = new Publisher;
}
public function getClientSuccess()
@@ -58,206 +58,206 @@ public function getClientFail()
public function testAddsHubServerUrl()
{
- $this->_publisher->addHubUrl('http://www.example.com/hub');
- $this->assertEquals(array('http://www.example.com/hub'), $this->_publisher->getHubUrls());
+ $this->publisher->addHubUrl('http://www.example.com/hub');
+ $this->assertEquals(array('http://www.example.com/hub'), $this->publisher->getHubUrls());
}
public function testAddsHubServerUrlsFromArray()
{
- $this->_publisher->addHubUrls(array(
+ $this->publisher->addHubUrls(array(
'http://www.example.com/hub', 'http://www.example.com/hub2'
));
$this->assertEquals(array(
'http://www.example.com/hub', 'http://www.example.com/hub2'
- ), $this->_publisher->getHubUrls());
+ ), $this->publisher->getHubUrls());
}
public function testAddsHubServerUrlsFromArrayUsingSetConfig()
{
- $this->_publisher->setOptions(array('hubUrls' => array(
+ $this->publisher->setOptions(array('hubUrls' => array(
'http://www.example.com/hub', 'http://www.example.com/hub2'
)));
$this->assertEquals(array(
'http://www.example.com/hub', 'http://www.example.com/hub2'
- ), $this->_publisher->getHubUrls());
+ ), $this->publisher->getHubUrls());
}
public function testRemovesHubServerUrl()
{
- $this->_publisher->addHubUrls(array(
+ $this->publisher->addHubUrls(array(
'http://www.example.com/hub', 'http://www.example.com/hub2'
));
- $this->_publisher->removeHubUrl('http://www.example.com/hub');
+ $this->publisher->removeHubUrl('http://www.example.com/hub');
$this->assertEquals(array(
1 => 'http://www.example.com/hub2'
- ), $this->_publisher->getHubUrls());
+ ), $this->publisher->getHubUrls());
}
public function testRetrievesUniqueHubServerUrlsOnly()
{
- $this->_publisher->addHubUrls(array(
+ $this->publisher->addHubUrls(array(
'http://www.example.com/hub', 'http://www.example.com/hub2',
'http://www.example.com/hub'
));
$this->assertEquals(array(
'http://www.example.com/hub', 'http://www.example.com/hub2'
- ), $this->_publisher->getHubUrls());
+ ), $this->publisher->getHubUrls());
}
public function testThrowsExceptionOnSettingEmptyHubServerUrl()
{
$this->setExpectedException('Zend\Feed\PubSubHubbub\Exception\ExceptionInterface');
- $this->_publisher->addHubUrl('');
+ $this->publisher->addHubUrl('');
}
public function testThrowsExceptionOnSettingNonStringHubServerUrl()
{
$this->setExpectedException('Zend\Feed\PubSubHubbub\Exception\ExceptionInterface');
- $this->_publisher->addHubUrl(123);
+ $this->publisher->addHubUrl(123);
}
public function testThrowsExceptionOnSettingInvalidHubServerUrl()
{
$this->setExpectedException('Zend\Feed\PubSubHubbub\Exception\ExceptionInterface');
- $this->_publisher->addHubUrl('http://');
+ $this->publisher->addHubUrl('http://');
}
public function testAddsUpdatedTopicUrl()
{
- $this->_publisher->addUpdatedTopicUrl('http://www.example.com/topic');
- $this->assertEquals(array('http://www.example.com/topic'), $this->_publisher->getUpdatedTopicUrls());
+ $this->publisher->addUpdatedTopicUrl('http://www.example.com/topic');
+ $this->assertEquals(array('http://www.example.com/topic'), $this->publisher->getUpdatedTopicUrls());
}
public function testAddsUpdatedTopicUrlsFromArray()
{
- $this->_publisher->addUpdatedTopicUrls(array(
+ $this->publisher->addUpdatedTopicUrls(array(
'http://www.example.com/topic', 'http://www.example.com/topic2'
));
$this->assertEquals(array(
'http://www.example.com/topic', 'http://www.example.com/topic2'
- ), $this->_publisher->getUpdatedTopicUrls());
+ ), $this->publisher->getUpdatedTopicUrls());
}
public function testAddsUpdatedTopicUrlsFromArrayUsingSetConfig()
{
- $this->_publisher->setOptions(array('updatedTopicUrls' => array(
+ $this->publisher->setOptions(array('updatedTopicUrls' => array(
'http://www.example.com/topic', 'http://www.example.com/topic2'
)));
$this->assertEquals(array(
'http://www.example.com/topic', 'http://www.example.com/topic2'
- ), $this->_publisher->getUpdatedTopicUrls());
+ ), $this->publisher->getUpdatedTopicUrls());
}
public function testRemovesUpdatedTopicUrl()
{
- $this->_publisher->addUpdatedTopicUrls(array(
+ $this->publisher->addUpdatedTopicUrls(array(
'http://www.example.com/topic', 'http://www.example.com/topic2'
));
- $this->_publisher->removeUpdatedTopicUrl('http://www.example.com/topic');
+ $this->publisher->removeUpdatedTopicUrl('http://www.example.com/topic');
$this->assertEquals(array(
1 => 'http://www.example.com/topic2'
- ), $this->_publisher->getUpdatedTopicUrls());
+ ), $this->publisher->getUpdatedTopicUrls());
}
public function testRetrievesUniqueUpdatedTopicUrlsOnly()
{
- $this->_publisher->addUpdatedTopicUrls(array(
+ $this->publisher->addUpdatedTopicUrls(array(
'http://www.example.com/topic', 'http://www.example.com/topic2',
'http://www.example.com/topic'
));
$this->assertEquals(array(
'http://www.example.com/topic', 'http://www.example.com/topic2'
- ), $this->_publisher->getUpdatedTopicUrls());
+ ), $this->publisher->getUpdatedTopicUrls());
}
public function testThrowsExceptionOnSettingEmptyUpdatedTopicUrl()
{
$this->setExpectedException('Zend\Feed\PubSubHubbub\Exception\ExceptionInterface');
- $this->_publisher->addUpdatedTopicUrl('');
+ $this->publisher->addUpdatedTopicUrl('');
}
public function testThrowsExceptionOnSettingNonStringUpdatedTopicUrl()
{
$this->setExpectedException('Zend\Feed\PubSubHubbub\Exception\ExceptionInterface');
- $this->_publisher->addUpdatedTopicUrl(123);
+ $this->publisher->addUpdatedTopicUrl(123);
}
public function testThrowsExceptionOnSettingInvalidUpdatedTopicUrl()
{
$this->setExpectedException('Zend\Feed\PubSubHubbub\Exception\ExceptionInterface');
- $this->_publisher->addUpdatedTopicUrl('http://');
+ $this->publisher->addUpdatedTopicUrl('http://');
}
public function testAddsParameter()
{
- $this->_publisher->setParameter('foo', 'bar');
- $this->assertEquals(array('foo'=> 'bar'), $this->_publisher->getParameters());
+ $this->publisher->setParameter('foo', 'bar');
+ $this->assertEquals(array('foo'=> 'bar'), $this->publisher->getParameters());
}
public function testAddsParametersFromArray()
{
- $this->_publisher->setParameters(array(
+ $this->publisher->setParameters(array(
'foo' => 'bar', 'boo' => 'baz'
));
$this->assertEquals(array(
'foo' => 'bar', 'boo' => 'baz'
- ), $this->_publisher->getParameters());
+ ), $this->publisher->getParameters());
}
public function testAddsParametersFromArrayInSingleMethod()
{
- $this->_publisher->setParameter(array(
+ $this->publisher->setParameter(array(
'foo' => 'bar', 'boo' => 'baz'
));
$this->assertEquals(array(
'foo' => 'bar', 'boo' => 'baz'
- ), $this->_publisher->getParameters());
+ ), $this->publisher->getParameters());
}
public function testAddsParametersFromArrayUsingSetConfig()
{
- $this->_publisher->setOptions(array('parameters' => array(
+ $this->publisher->setOptions(array('parameters' => array(
'foo' => 'bar', 'boo' => 'baz'
)));
$this->assertEquals(array(
'foo' => 'bar', 'boo' => 'baz'
- ), $this->_publisher->getParameters());
+ ), $this->publisher->getParameters());
}
public function testRemovesParameter()
{
- $this->_publisher->setParameters(array(
+ $this->publisher->setParameters(array(
'foo' => 'bar', 'boo' => 'baz'
));
- $this->_publisher->removeParameter('boo');
+ $this->publisher->removeParameter('boo');
$this->assertEquals(array(
'foo' => 'bar'
- ), $this->_publisher->getParameters());
+ ), $this->publisher->getParameters());
}
public function testRemovesParameterIfSetToNull()
{
- $this->_publisher->setParameters(array(
+ $this->publisher->setParameters(array(
'foo' => 'bar', 'boo' => 'baz'
));
- $this->_publisher->setParameter('boo', null);
+ $this->publisher->setParameter('boo', null);
$this->assertEquals(array(
'foo' => 'bar'
- ), $this->_publisher->getParameters());
+ ), $this->publisher->getParameters());
}
public function testNotifiesHubWithCorrectParameters()
{
PubSubHubbub::setHttpClient($this->getClientSuccess());
$client = PubSubHubbub::getHttpClient();
- $this->_publisher->addHubUrl('http://www.example.com/hub');
- $this->_publisher->addUpdatedTopicUrl('http://www.example.com/topic');
- $this->_publisher->setParameter('foo', 'bar');
- $this->_publisher->notifyAll();
+ $this->publisher->addHubUrl('http://www.example.com/hub');
+ $this->publisher->addUpdatedTopicUrl('http://www.example.com/topic');
+ $this->publisher->setParameter('foo', 'bar');
+ $this->publisher->notifyAll();
$this->assertEquals('hub.mode=publish&hub.url=http%3A%2F%2Fwww.example.com%2Ftopic&foo=bar',
$client->getRequest()->getContent());
}
@@ -266,10 +266,10 @@ public function testNotifiesHubWithCorrectParametersAndMultipleTopics()
{
PubSubHubbub::setHttpClient($this->getClientSuccess());
$client = PubSubHubbub::getHttpClient();
- $this->_publisher->addHubUrl('http://www.example.com/hub');
- $this->_publisher->addUpdatedTopicUrl('http://www.example.com/topic');
- $this->_publisher->addUpdatedTopicUrl('http://www.example.com/topic2');
- $this->_publisher->notifyAll();
+ $this->publisher->addHubUrl('http://www.example.com/hub');
+ $this->publisher->addUpdatedTopicUrl('http://www.example.com/topic');
+ $this->publisher->addUpdatedTopicUrl('http://www.example.com/topic2');
+ $this->publisher->notifyAll();
$this->assertEquals('hub.mode=publish&hub.url=http%3A%2F%2Fwww.example.com%2Ftopic&hub.url=http%3A%2F%2Fwww.example.com%2Ftopic2',
$client->getRequest()->getContent());
}
@@ -278,22 +278,22 @@ public function testNotifiesHubAndReportsSuccess()
{
PubSubHubbub::setHttpClient($this->getClientSuccess());
$client = PubSubHubbub::getHttpClient();
- $this->_publisher->addHubUrl('http://www.example.com/hub');
- $this->_publisher->addUpdatedTopicUrl('http://www.example.com/topic');
- $this->_publisher->setParameter('foo', 'bar');
- $this->_publisher->notifyAll();
- $this->assertTrue($this->_publisher->isSuccess());
+ $this->publisher->addHubUrl('http://www.example.com/hub');
+ $this->publisher->addUpdatedTopicUrl('http://www.example.com/topic');
+ $this->publisher->setParameter('foo', 'bar');
+ $this->publisher->notifyAll();
+ $this->assertTrue($this->publisher->isSuccess());
}
public function testNotifiesHubAndReportsFail()
{
PubSubHubbub::setHttpClient($this->getClientFail());
$client = PubSubHubbub::getHttpClient();
- $this->_publisher->addHubUrl('http://www.example.com/hub');
- $this->_publisher->addUpdatedTopicUrl('http://www.example.com/topic');
- $this->_publisher->setParameter('foo', 'bar');
- $this->_publisher->notifyAll();
- $this->assertFalse($this->_publisher->isSuccess());
+ $this->publisher->addHubUrl('http://www.example.com/hub');
+ $this->publisher->addUpdatedTopicUrl('http://www.example.com/topic');
+ $this->publisher->setParameter('foo', 'bar');
+ $this->publisher->notifyAll();
+ $this->assertFalse($this->publisher->isSuccess());
}
}
View
54 tests/ZendTest/Feed/PubSubHubbub/SubscriberHttpTest.php
@@ -33,35 +33,35 @@ class SubscriberHttpTest extends \PHPUnit_Framework_TestCase
{
/** @var Subscriber */
- protected $_subscriber = null;
+ protected $subscriber = null;
/** @var string */
- protected $_baseuri;
+ protected $baseuri;
/** @var HttpClient */
- protected $_client = null;
+ protected $client = null;
- protected $_storage;
+ protected $storage;
public function setUp()
{
- $this->_baseuri = constant('TESTS_ZEND_FEED_PUBSUBHUBBUB_BASEURI');
- if ($this->_baseuri) {
- if (substr($this->_baseuri, -1) != '/') {
- $this->_baseuri .= '/';
+ $this->baseuri = constant('TESTS_ZEND_FEED_PUBSUBHUBBUB_BASEURI');
+ if ($this->baseuri) {
+ if (substr($this->baseuri, -1) != '/') {
+ $this->baseuri .= '/';
}
$name = $this->getName();
if (($pos = strpos($name, ' ')) !== false) {
$name = substr($name, 0, $pos);
}
- $uri = $this->_baseuri . $name . '.php';
- $this->_client = new HttpClient($uri);
- $this->_client->setAdapter('\Zend\Http\Client\Adapter\Socket');
- PubSubHubbub::setHttpClient($this->_client);
- $this->_subscriber = new Subscriber;
+ $uri = $this->baseuri . $name . '.php';
+ $this->client = new HttpClient($uri);
+ $this->client->setAdapter('\Zend\Http\Client\Adapter\Socket');
+ PubSubHubbub::setHttpClient($this->client);
+ $this->subscriber = new Subscriber;
- $this->_storage = $this->_getCleanMock('\Zend\Feed\PubSubHubbub\Model\Subscription');
- $this->_subscriber->setStorage($this->_storage);
+ $this->storage = $this->_getCleanMock('\Zend\Feed\PubSubHubbub\Model\Subscription');
+ $this->subscriber->setStorage($this->storage);
} else {
// Skip tests
@@ -71,32 +71,32 @@ public function setUp()
public function testSubscriptionRequestSendsExpectedPostData()
{
- $this->_subscriber->setTopicUrl('http://www.example.com/topic');
- $this->_subscriber->addHubUrl($this->_baseuri . '/testRawPostData.php');
- $this->_subscriber->setCallbackUrl('http://www.example.com/callback');
- $this->_subscriber->setTestStaticToken('abc'); // override for testing
- $this->_subscriber->subscribeAll();
+ $this->subscriber->setTopicUrl('http://www.example.com/topic');
+ $this->subscriber->addHubUrl($this->baseuri . '/testRawPostData.php');
+ $this->subscriber->setCallbackUrl('http://www.example.com/callback');
+ $this->subscriber->setTestStaticToken('abc'); // override for testing
+ $this->subscriber->subscribeAll();
$this->assertEquals(
'hub.callback=http%3A%2F%2Fwww.example.com%2Fcallback%3Fxhub.subscription%3D5536df06b5d'
.'cb966edab3a4c4d56213c16a8184b&hub.lease_seconds=2592000&hub.mode='
.'subscribe&hub.topic=http%3A%2F%2Fwww.example.com%2Ftopic&hub.veri'
.'fy=sync&hub.verify=async&hub.verify_token=abc',
- $this->_client->getResponse()->getBody());
+ $this->client->getResponse()->getBody());
}
public function testUnsubscriptionRequestSendsExpectedPostData()
{
- $this->_subscriber->setTopicUrl('http://www.example.com/topic');
- $this->_subscriber->addHubUrl($this->_baseuri . '/testRawPostData.php');
- $this->_subscriber->setCallbackUrl('http://www.example.com/callback');
- $this->_subscriber->setTestStaticToken('abc'); //override for testing
- $this->_subscriber->unsubscribeAll();
+ $this->subscriber->setTopicUrl('http://www.example.com/topic');
+ $this->subscriber->addHubUrl($this->baseuri . '/testRawPostData.php');
+ $this->subscriber->setCallbackUrl('http://www.example.com/callback');
+ $this->subscriber->setTestStaticToken('abc'); //override for testing
+ $this->subscriber->unsubscribeAll();
$this->assertEquals(
'hub.callback=http%3A%2F%2Fwww.example.com%2Fcallback%3Fxhub.subscription%3D5536df06b5d'
.'cb966edab3a4c4d56213c16a8184b&hub.mode=unsubscribe&hub.topic=http'
.'%3A%2F%2Fwww.example.com%2Ftopic&hub.verify=sync&hub.verify=async'
.'&hub.verify_token=abc',
- $this->_client->getResponse()->getBody());
+ $this->client->getResponse()->getBody());
}
protected function _getCleanMock($className)
View
122 tests/ZendTest/Feed/PubSubHubbub/SubscriberTest.php
@@ -25,269 +25,269 @@
class SubscriberTest extends \PHPUnit_Framework_TestCase
{
/** @var Subscriber */
- protected $_subscriber = null;
+ protected $subscriber = null;
- protected $_adapter = null;
+ protected $adapter = null;
- protected $_tableGateway = null;
+ protected $tableGateway = null;
public function setUp()
{
$client = new HttpClient;
PubSubHubbub::setHttpClient($client);
- $this->_subscriber = new Subscriber;
- $this->_adapter = $this->_getCleanMock(
+ $this->subscriber = new Subscriber;
+ $this->adapter = $this->_getCleanMock(
'\Zend\Db\Adapter\Adapter'
);
- $this->_tableGateway = $this->_getCleanMock(
+ $this->tableGateway = $this->_getCleanMock(
'\Zend\Db\TableGateway\TableGateway'
);
- $this->_tableGateway->expects($this->any())->method('getAdapter')
- ->will($this->returnValue($this->_adapter));
+ $this->tableGateway->expects($this->any())->method('getAdapter')
+ ->will($this->returnValue($this->adapter));
}
public function testAddsHubServerUrl()
{
- $this->_subscriber->addHubUrl('http://www.example.com/hub');
- $this->assertEquals(array('http://www.example.com/hub'), $this->_subscriber->getHubUrls());
+ $this->subscriber->addHubUrl('http://www.example.com/hub');
+ $this->assertEquals(array('http://www.example.com/hub'), $this->subscriber->getHubUrls());
}
public function testAddsHubServerUrlsFromArray()
{
- $this->_subscriber->addHubUrls(array(
+ $this->subscriber->addHubUrls(array(
'http://www.example.com/hub', 'http://www.example.com/hub2'
));
$this->assertEquals(array(
'http://www.example.com/hub', 'http://www.example.com/hub2'
- ), $this->_subscriber->getHubUrls());
+ ), $this->subscriber->getHubUrls());
}
public function testAddsHubServerUrlsFromArrayUsingSetOptions()
{
- $this->_subscriber->setOptions(array('hubUrls' => array(
+ $this->subscriber->setOptions(array('hubUrls' => array(
'http://www.example.com/hub', 'http://www.example.com/hub2'
)));
$this->assertEquals(array(
'http://www.example.com/hub', 'http://www.example.com/hub2'
- ), $this->_subscriber->getHubUrls());
+ ), $this->subscriber->getHubUrls());
}
public function testRemovesHubServerUrl()
{
- $this->_subscriber->addHubUrls(array(
+ $this->subscriber->addHubUrls(array(
'http://www.example.com/hub', 'http://www.example.com/hub2'
));
- $this->_subscriber->removeHubUrl('http://www.example.com/hub');
+ $this->subscriber->removeHubUrl('http://www.example.com/hub');
$this->assertEquals(array(
1 => 'http://www.example.com/hub2'
- ), $this->_subscriber->getHubUrls());
+ ), $this->subscriber->getHubUrls());
}
public function testRetrievesUniqueHubServerUrlsOnly()
{
- $this->_subscriber->addHubUrls(array(
+ $this->subscriber->addHubUrls(array(
'http://www.example.com/hub', 'http://www.example.com/hub2',
'http://www.example.com/hub'
));
$this->assertEquals(array(
'http://www.example.com/hub', 'http://www.example.com/hub2'
- ), $this->_subscriber->getHubUrls());
+ ), $this->subscriber->getHubUrls());
}
public function testThrowsExceptionOnSettingEmptyHubServerUrl()
{
$this->setExpectedException('Zend\Feed\PubSubHubbub\Exception\ExceptionInterface');
- $this->_subscriber->addHubUrl('');
+ $this->subscriber->addHubUrl('');
}
public function testThrowsExceptionOnSettingNonStringHubServerUrl()
{
$this->setExpectedException('Zend\Feed\PubSubHubbub\Exception\ExceptionInterface');
- $this->_subscriber->addHubUrl(123);
+ $this->subscriber->addHubUrl(123);
}
public function testThrowsExceptionOnSettingInvalidHubServerUrl()
{
$this->setExpectedException('Zend\Feed\PubSubHubbub\Exception\ExceptionInterface');
- $this->_subscriber->addHubUrl('http://');
+ $this->subscriber->addHubUrl('http://');
}
public function testAddsParameter()
{
- $this->_subscriber->setParameter('foo', 'bar');
- $this->assertEquals(array('foo'=>'bar'), $this->_subscriber->getParameters());
+ $this->subscriber->setParameter('foo', 'bar');
+ $this->assertEquals(array('foo'=>'bar'), $this->subscriber->getParameters());
}
public function testAddsParametersFromArray()
{
- $this->_subscriber->setParameters(array(
+ $this->subscriber->setParameters(array(
'foo' => 'bar', 'boo' => 'baz'
));
$this->assertEquals(array(
'foo' => 'bar', 'boo' => 'baz'
- ), $this->_subscriber->getParameters());
+ ), $this->subscriber->getParameters());
}
public function testAddsParametersFromArrayInSingleMethod()
{
- $this->_subscriber->setParameter(array(
+ $this->subscriber->setParameter(array(
'foo' => 'bar', 'boo' => 'baz'
));
$this->assertEquals(array(
'foo' => 'bar', 'boo' => 'baz'
- ), $this->_subscriber->getParameters());
+ ), $this->subscriber->getParameters());
}
public function testAddsParametersFromArrayUsingSetOptions()
{
- $this->_subscriber->setOptions(array('parameters' => array(
+ $this->subscriber->setOptions(array('parameters' => array(
'foo' => 'bar', 'boo' => 'baz'
)));
$this->assertEquals(array(
'foo' => 'bar', 'boo' => 'baz'
- ), $this->_subscriber->getParameters());
+ ), $this->subscriber->getParameters());
}
public function testRemovesParameter()
{
- $this->_subscriber->setParameters(array(
+ $this->subscriber->setParameters(array(
'foo' => 'bar', 'boo' => 'baz'
));
- $this->_subscriber->removeParameter('boo');
+ $this->subscriber->removeParameter('boo');
$this->assertEquals(array(
'foo' => 'bar'
- ), $this->_subscriber->getParameters());
+ ), $this->subscriber->getParameters());
}
public function testRemovesParameterIfSetToNull()
{
- $this->_subscriber->setParameters(array(
+ $this->subscriber->setParameters(array(
'foo' => 'bar', 'boo' => 'baz'
));
- $this->_subscriber->setParameter('boo', null);
+ $this->subscriber->setParameter('boo', null);
$this->assertEquals(array(
'foo' => 'bar'
- ), $this->_subscriber->getParameters());
+ ), $this->subscriber->getParameters());
}
public function testCanSetTopicUrl()
{
- $this->_subscriber->setTopicUrl('http://www.example.com/topic');
- $this->assertEquals('http://www.example.com/topic', $this->_subscriber->getTopicUrl());
+ $this->subscriber->setTopicUrl('http://www.example.com/topic');
+ $this->assertEquals('http://www.example.com/topic', $this->subscriber->getTopicUrl());
}
public function testThrowsExceptionOnSettingEmptyTopicUrl()
{
$this->setExpectedException('Zend\Feed\PubSubHubbub\Exception\ExceptionInterface');
- $this->_subscriber->setTopicUrl('');
+ $this->subscriber->setTopicUrl('');
}
public function testThrowsExceptionOnSettingNonStringTopicUrl()
{
$this->setExpectedException('Zend\Feed\PubSubHubbub\Exception\ExceptionInterface');
- $this->_subscriber->setTopicUrl(123);
+ $this->subscriber->setTopicUrl(123);
}
public function testThrowsExceptionOnSettingInvalidTopicUrl()
{
$this->setExpectedException('Zend\Feed\PubSubHubbub\Exception\ExceptionInterface');
- $this->_subscriber->setTopicUrl('http://');
+ $this->subscriber->setTopicUrl('http://');
}
public function testThrowsExceptionOnMissingTopicUrl()
{
$this->setExpectedException('Zend\Feed\PubSubHubbub\Exception\ExceptionInterface');
- $this->_subscriber->getTopicUrl();
+ $this->subscriber->getTopicUrl();
}
public function testCanSetCallbackUrl()
{
- $this->_subscriber->setCallbackUrl('http://www.example.com/callback');
- $this->assertEquals('http://www.example.com/callback', $this->_subscriber->getCallbackUrl());
+ $this->subscriber->setCallbackUrl('http://www.example.com/callback');
+ $this->assertEquals('http://www.example.com/callback', $this->subscriber->getCallbackUrl());
}
public function testThrowsExceptionOnSettingEmptyCallbackUrl()
{
$this->setExpectedException('Zend\Feed\PubSubHubbub\Exception\ExceptionInterface');
- $this->_subscriber->setCallbackUrl('');
+ $this->subscriber->setCallbackUrl('');
}
public function testThrowsExceptionOnSettingNonStringCallbackUrl()
{
$this->setExpectedException('Zend\Feed\PubSubHubbub\Exception\ExceptionInterface');
- $this->_subscriber->setCallbackUrl(123);
+ $this->subscriber->setCallbackUrl(123);
}
public function testThrowsExceptionOnSettingInvalidCallbackUrl()
{
$this->setExpectedException('Zend\Feed\PubSubHubbub\Exception\ExceptionInterface');
- $this->_subscriber->setCallbackUrl('http://');
+ $this->subscriber->setCallbackUrl('http://');
}
public function testThrowsExceptionOnMissingCallbackUrl()
{
$this->setExpectedException('Zend\Feed\PubSubHubbub\Exception\ExceptionInterface');
- $this->_subscriber->getCallbackUrl();
+ $this->subscriber->getCallbackUrl();
}
public function testCanSetLeaseSeconds()
{
- $this->_subscriber->setLeaseSeconds('10000');
- $this->assertEquals(10000, $this->_subscriber->getLeaseSeconds());
+ $this->subscriber->setLeaseSeconds('10000');
+ $this->assertEquals(10000, $this->subscriber->getLeaseSeconds());
}
public function testThrowsExceptionOnSettingZeroAsLeaseSeconds()
{
$this->setExpectedException('Zend\Feed\PubSubHubbub\Exception\ExceptionInterface');
- $this->_subscriber->setLeaseSeconds(0);
+ $this->subscriber->setLeaseSeconds(0);
}
public function testThrowsExceptionOnSettingLessThanZeroAsLeaseSeconds()
{
$this->setExpectedException('Zend\Feed\PubSubHubbub\Exception\ExceptionInterface');
- $this->_subscriber->setLeaseSeconds(-1);
+ $this->subscriber->setLeaseSeconds(-1);
}
public function testThrowsExceptionOnSettingAnyScalarTypeCastToAZeroOrLessIntegerAsLeaseSeconds()
{
$this->setExpectedException('Zend\Feed\PubSubHubbub\Exception\ExceptionInterface');
- $this->_subscriber->setLeaseSeconds('0aa');
+ $this->subscriber->setLeaseSeconds('0aa');
}
public function testCanSetPreferredVerificationMode()
{
- $this->_subscriber->setPreferredVerificationMode(PubSubHubbub::VERIFICATION_MODE_ASYNC);
- $this->assertEquals(PubSubHubbub::VERIFICATION_MODE_ASYNC, $this->_subscriber->getPreferredVerificationMode());
+ $this->subscriber->setPreferredVerificationMode(PubSubHubbub::VERIFICATION_MODE_ASYNC);
+ $this->assertEquals(PubSubHubbub::VERIFICATION_MODE_ASYNC, $this->subscriber->getPreferredVerificationMode());
}
public function testSetsPreferredVerificationModeThrowsExceptionOnSettingBadMode()
{
$this->setExpectedException('Zend\Feed\PubSubHubbub\Exception\ExceptionInterface');
- $this->_subscriber->setPreferredVerificationMode('abc');
+ $this->subscriber->setPreferredVerificationMode('abc');
}
public function testPreferredVerificationModeDefaultsToSync()
{
- $this->assertEquals(PubSubHubbub::VERIFICATION_MODE_SYNC, $this->_subscriber->getPreferredVerificationMode());
+ $this->assertEquals(PubSubHubbub::VERIFICATION_MODE_SYNC, $this->subscriber->getPreferredVerificationMode());
}
public function testCanSetStorageImplementation()
{
- $storage = new Subscription($this->_tableGateway);
- $this->_subscriber->setStorage($storage);
- $this->assertThat($this->_subscriber->getStorage(), $this->identicalTo($storage));
+ $storage = new Subscription($this->tableGateway);
+ $this->subscriber->setStorage($storage);
+ $this->assertThat($this->subscriber->getStorage(), $this->identicalTo($storage));
}
public function testGetStorageThrowsExceptionIfNoneSet()
{
$this->setExpectedException('Zend\Feed\PubSubHubbub\Exception\ExceptionInterface');
- $this->_subscriber->getStorage();
+ $this->subscriber->getStorage();
}
protected function _getCleanMock($className)
View
46 tests/ZendTest/Feed/Reader/Entry/AtomStandaloneEntryTest.php
@@ -23,18 +23,18 @@
class AtomStandaloneEntryTest extends \PHPUnit_Framework_TestCase
{
- protected $_feedSamplePath = null;
+ protected $feedSamplePath = null;
- protected $_expectedCats = array();
+ protected $expectedCats = array();
- protected $_expectedCatsDc = array();
+ protected $expectedCatsDc = array();
public function setup()
{
Reader\Reader::reset();
- $this->_feedSamplePath = dirname(__FILE__) . '/_files/AtomStandaloneEntry';
+ $this->feedSamplePath = dirname(__FILE__) . '/_files/AtomStandaloneEntry';
- $this->_expectedCats = array(
+ $this->expectedCats = array(
array(
'term' => 'topic1',
'scheme' => 'http://example.com/schema1',
@@ -51,7 +51,7 @@ public function setup()
'label' => 'Cat & Dog'
)
);
- $this->_expectedCatsDc = array(
+ $this->expectedCatsDc = array(
array(
'term' => 'topic1',
'scheme' => null,
@@ -68,7 +68,7 @@ public function setup()
public function testReaderImportOfAtomEntryDocumentReturnsEntryClass()
{
$object = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath . '/id/atom10.xml')
+ file_get_contents($this->feedSamplePath . '/id/atom10.xml')
);
$this->assertTrue($object instanceof Reader\Entry\Atom);
}
@@ -80,7 +80,7 @@ public function testReaderImportOfAtomEntryDocumentReturnsEntryClass()
public function testGetsIdFromAtom10()
{
$entry = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath . '/id/atom10.xml')
+ file_get_contents($this->feedSamplePath . '/id/atom10.xml')
);
$this->assertEquals('1', $entry->getId());
}
@@ -92,7 +92,7 @@ public function testGetsIdFromAtom10()
public function testGetsDateCreatedFromAtom10()
{
$entry = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath . '/datecreated/atom10.xml')
+ file_get_contents($this->feedSamplePath . '/datecreated/atom10.xml')
);
$edate = DateTime::createFromFormat(DateTime::ISO8601, '2009-03-07T08:03:50Z');
$this->assertEquals($edate, $entry->getDateCreated());
@@ -105,7 +105,7 @@ public function testGetsDateCreatedFromAtom10()
public function testGetsDateModifiedFromAtom10()
{
$entry = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath . '/datemodified/atom10.xml')
+ file_get_contents($this->feedSamplePath . '/datemodified/atom10.xml')
);
$edate = DateTime::createFromFormat(DateTime::ISO8601, '2009-03-07T08:03:50Z');
$this->assertEquals($edate, $entry->getDateModified());
@@ -118,7 +118,7 @@ public function testGetsDateModifiedFromAtom10()
public function testGetsTitleFromAtom10()
{
$entry = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath . '/title/atom10.xml')
+ file_get_contents($this->feedSamplePath . '/title/atom10.xml')
);
$this->assertEquals('Entry Title', $entry->getTitle());
}
@@ -130,7 +130,7 @@ public function testGetsTitleFromAtom10()
public function testGetsAuthorsFromAtom10()
{
$entry = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath . '/author/atom10.xml')
+ file_get_contents($this->feedSamplePath . '/author/atom10.xml')
);
$authors = array(
@@ -152,7 +152,7 @@ public function testGetsAuthorsFromAtom10()
public function testGetsAuthorFromAtom10()
{
$entry = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath . '/author/atom10.xml')
+ file_get_contents($this->feedSamplePath . '/author/atom10.xml')
);
$this->assertEquals(array('name'=>'Joe Bloggs','email'=>'joe@example.com','uri'=>'http://www.example.com'), $entry->getAuthor());
}
@@ -164,7 +164,7 @@ public function testGetsAuthorFromAtom10()
public function testGetsDescriptionFromAtom10()
{
$entry = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath . '/description/atom10.xml')
+ file_get_contents($this->feedSamplePath . '/description/atom10.xml')
);
$this->assertEquals('Entry Description', $entry->getDescription());
}
@@ -176,7 +176,7 @@ public function testGetsDescriptionFromAtom10()
public function testGetsEnclosureFromAtom10()
{
$entry = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath.'/enclosure/atom10.xml')
+ file_get_contents($this->feedSamplePath.'/enclosure/atom10.xml')
);
$expected = new \stdClass();
@@ -194,7 +194,7 @@ public function testGetsEnclosureFromAtom10()
public function testGetsContentFromAtom10()
{
$entry = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath . '/content/atom10.xml')
+ file_get_contents($this->feedSamplePath . '/content/atom10.xml')
);
$this->assertEquals('Entry Content &', $entry->getContent());
}
@@ -206,7 +206,7 @@ public function testGetsContentFromAtom10()
public function testGetsContentFromAtom10Html()
{
$entry = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath . '/content/atom10_Html.xml')
+ file_get_contents($this->feedSamplePath . '/content/atom10_Html.xml')
);
$this->assertEquals('<p>Entry Content &amp;</p>', $entry->getContent());
}
@@ -218,7 +218,7 @@ public function testGetsContentFromAtom10Html()
public function testGetsContentFromAtom10HtmlCdata()
{
$entry = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath . '/content/atom10_HtmlCdata.xml')
+ file_get_contents($this->feedSamplePath . '/content/atom10_HtmlCdata.xml')
);
$this->assertEquals('<p>Entry Content &amp;</p>', $entry->getContent());
}
@@ -230,7 +230,7 @@ public function testGetsContentFromAtom10HtmlCdata()
public function testGetsContentFromAtom10XhtmlNamespaced()
{
$entry = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath . '/content/atom10_Xhtml.xml')
+ file_get_contents($this->feedSamplePath . '/content/atom10_Xhtml.xml')
);
$this->assertEquals('<p class="x:"><em>Entry Content &amp;x:</em></p>', $entry->getContent());
}
@@ -242,7 +242,7 @@ public function testGetsContentFromAtom10XhtmlNamespaced()
public function testGetsLinkFromAtom10()
{
$entry = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath . '/link/atom10.xml')
+ file_get_contents($this->feedSamplePath . '/link/atom10.xml')
);
$this->assertEquals('http://www.example.com/entry', $entry->getLink());
}
@@ -254,7 +254,7 @@ public function testGetsLinkFromAtom10()
public function testGetsCommentLinkFromAtom10()
{
$entry = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath . '/commentlink/atom10.xml')
+ file_get_contents($this->feedSamplePath . '/commentlink/atom10.xml')
);
$this->assertEquals('http://www.example.com/entry/comments', $entry->getCommentLink());
}
@@ -266,9 +266,9 @@ public function testGetsCommentLinkFromAtom10()
public function testGetsCategoriesFromAtom10()
{
$entry = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath.'/category/atom10.xml')
+ file_get_contents($this->feedSamplePath.'/category/atom10.xml')
);
- $this->assertEquals($this->_expectedCats, (array) $entry->getCategories());
+ $this->assertEquals($this->expectedCats, (array) $entry->getCategories());
$this->assertEquals(array('topic1','Cat & Dog'), array_values($entry->getCategories()->getValues()));
}
View
92 tests/ZendTest/Feed/Reader/Entry/AtomTest.php
@@ -23,17 +23,17 @@
class AtomTest extends \PHPUnit_Framework_TestCase
{
- protected $_feedSamplePath = null;
+ protected $feedSamplePath = null;
- protected $_expectedCats = array();
+ protected $expectedCats = array();
- protected $_expectedCatsDc = array();
+ protected $expectedCatsDc = array();
public function setup()
{
Reader\Reader::reset();
- $this->_feedSamplePath = dirname(__FILE__) . '/_files/Atom';
- $this->_expectedCats = array(
+ $this->feedSamplePath = dirname(__FILE__) . '/_files/Atom';
+ $this->expectedCats = array(
array(
'term' => 'topic1',
'scheme' => 'http://example.com/schema1',
@@ -50,7 +50,7 @@ public function setup()
'label' => 'Cat & Dog'
)
);
- $this->_expectedCatsDc = array(
+ $this->expectedCatsDc = array(
array(
'term' => 'topic1',
'scheme' => null,
@@ -71,7 +71,7 @@ public function setup()
public function testGetsIdFromAtom03()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath . '/id/plain/atom03.xml')
+ file_get_contents($this->feedSamplePath . '/id/plain/atom03.xml')
);
$entry = $feed->current();
$this->assertEquals('1', $entry->getId());
@@ -80,7 +80,7 @@ public function testGetsIdFromAtom03()
public function testGetsIdFromAtom10()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath . '/id/plain/atom10.xml')
+ file_get_contents($this->feedSamplePath . '/id/plain/atom10.xml')
);
$entry = $feed->current();
$this->assertEquals('1', $entry->getId());
@@ -92,7 +92,7 @@ public function testGetsIdFromAtom10()
public function testGetsDateCreatedFromAtom03()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath . '/datecreated/plain/atom03.xml')
+ file_get_contents($this->feedSamplePath . '/datecreated/plain/atom03.xml')
);
$entry = $feed->current();
$edate = DateTime::createFromFormat(DateTime::ISO8601, '2009-03-07T08:03:50Z');
@@ -102,7 +102,7 @@ public function testGetsDateCreatedFromAtom03()
public function testGetsDateCreatedFromAtom10()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath . '/datecreated/plain/atom10.xml')
+ file_get_contents($this->feedSamplePath . '/datecreated/plain/atom10.xml')
);
$entry = $feed->current();
$edate = DateTime::createFromFormat(DateTime::ISO8601, '2009-03-07T08:03:50Z');
@@ -115,7 +115,7 @@ public function testGetsDateCreatedFromAtom10()
public function testGetsDateModifiedFromAtom03()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath . '/datemodified/plain/atom03.xml')
+ file_get_contents($this->feedSamplePath . '/datemodified/plain/atom03.xml')
);
$entry = $feed->current();
$edate = DateTime::createFromFormat(DateTime::ISO8601, '2009-03-07T08:03:50Z');
@@ -125,7 +125,7 @@ public function testGetsDateModifiedFromAtom03()
public function testGetsDateModifiedFromAtom10()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath . '/datemodified/plain/atom10.xml')
+ file_get_contents($this->feedSamplePath . '/datemodified/plain/atom10.xml')
);
$entry = $feed->current();
$edate = DateTime::createFromFormat(DateTime::ISO8601, '2009-03-07T08:03:50Z');
@@ -138,7 +138,7 @@ public function testGetsDateModifiedFromAtom10()
public function testGetsTitleFromAtom03()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath . '/title/plain/atom03.xml')
+ file_get_contents($this->feedSamplePath . '/title/plain/atom03.xml')
);
$entry = $feed->current();
$this->assertEquals('Entry Title', $entry->getTitle());
@@ -147,7 +147,7 @@ public function testGetsTitleFromAtom03()
public function testGetsTitleFromAtom10()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath . '/title/plain/atom10.xml')
+ file_get_contents($this->feedSamplePath . '/title/plain/atom10.xml')
);
$entry = $feed->current();
$this->assertEquals('Entry Title', $entry->getTitle());
@@ -159,7 +159,7 @@ public function testGetsTitleFromAtom10()
public function testGetsAuthorsFromAtom03()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath . '/author/plain/atom03.xml')
+ file_get_contents($this->feedSamplePath . '/author/plain/atom03.xml')
);
$authors = array(
@@ -178,7 +178,7 @@ public function testGetsAuthorsFromAtom03()
public function testGetsAuthorsFromAtom10()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath . '/author/plain/atom10.xml')
+ file_get_contents($this->feedSamplePath . '/author/plain/atom10.xml')
);
$authors = array(
@@ -200,7 +200,7 @@ public function testGetsAuthorsFromAtom10()
public function testGetsAuthorFromAtom03()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath . '/author/plain/atom03.xml')
+ file_get_contents($this->feedSamplePath . '/author/plain/atom03.xml')
);
$entry = $feed->current();
$this->assertEquals(array('name'=>'Joe Bloggs','email'=>'joe@example.com','uri'=>'http://www.example.com'), $entry->getAuthor());
@@ -209,7 +209,7 @@ public function testGetsAuthorFromAtom03()
public function testGetsAuthorFromAtom10()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath . '/author/plain/atom10.xml')
+ file_get_contents($this->feedSamplePath . '/author/plain/atom10.xml')
);
$entry = $feed->current();
$this->assertEquals(array('name'=>'Joe Bloggs','email'=>'joe@example.com','uri'=>'http://www.example.com'), $entry->getAuthor());
@@ -221,7 +221,7 @@ public function testGetsAuthorFromAtom10()
public function testGetsDescriptionFromAtom03()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath . '/description/plain/atom03.xml')
+ file_get_contents($this->feedSamplePath . '/description/plain/atom03.xml')
);
$entry = $feed->current();
$this->assertEquals('Entry Description', $entry->getDescription());
@@ -230,7 +230,7 @@ public function testGetsDescriptionFromAtom03()
public function testGetsDescriptionFromAtom10()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath . '/description/plain/atom10.xml')
+ file_get_contents($this->feedSamplePath . '/description/plain/atom10.xml')
);
$entry = $feed->current();
$this->assertEquals('Entry Description', $entry->getDescription());
@@ -242,7 +242,7 @@ public function testGetsDescriptionFromAtom10()
public function testGetsEnclosureFromAtom03()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath.'/enclosure/plain/atom03.xml')
+ file_get_contents($this->feedSamplePath.'/enclosure/plain/atom03.xml')
);
$entry = $feed->current();
@@ -257,7 +257,7 @@ public function testGetsEnclosureFromAtom03()
public function testGetsEnclosureFromAtom10()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath.'/enclosure/plain/atom10.xml')
+ file_get_contents($this->feedSamplePath.'/enclosure/plain/atom10.xml')
);
$entry = $feed->current();
@@ -275,7 +275,7 @@ public function testGetsEnclosureFromAtom10()
public function testGetsContentFromAtom03()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath . '/content/plain/atom03.xml')
+ file_get_contents($this->feedSamplePath . '/content/plain/atom03.xml')
);
$entry = $feed->current();
$this->assertEquals('Entry Content', $entry->getContent());
@@ -288,7 +288,7 @@ public function testGetsContentFromAtom03()
public function testGetsContentFromAtom10()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath . '/content/plain/atom10.xml')
+ file_get_contents($this->feedSamplePath . '/content/plain/atom10.xml')
);
$entry = $feed->current();
$this->assertEquals('Entry Content &amp;', $entry->getContent());
@@ -301,7 +301,7 @@ public function testGetsContentFromAtom10()
public function testGetsContentFromAtom10Html()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath . '/content/plain/atom10_Html.xml')
+ file_get_contents($this->feedSamplePath . '/content/plain/atom10_Html.xml')
);
$entry = $feed->current();
$this->assertEquals('<p>Entry Content &amp;</p>', $entry->getContent());
@@ -314,7 +314,7 @@ public function testGetsContentFromAtom10Html()
public function testGetsContentFromAtom10HtmlCdata()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath . '/content/plain/atom10_HtmlCdata.xml')
+ file_get_contents($this->feedSamplePath . '/content/plain/atom10_HtmlCdata.xml')
);
$entry = $feed->current();
$this->assertEquals('<p>Entry Content &amp;</p>', $entry->getContent());
@@ -327,7 +327,7 @@ public function testGetsContentFromAtom10HtmlCdata()
public function testGetsContentFromAtom10XhtmlNamespaced()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath . '/content/plain/atom10_Xhtml.xml')
+ file_get_contents($this->feedSamplePath . '/content/plain/atom10_Xhtml.xml')
);
$entry = $feed->current();
$this->assertEquals('<p class="x:"><em>Entry Content &amp;x:</em></p>', $entry->getContent());
@@ -339,7 +339,7 @@ public function testGetsContentFromAtom10XhtmlNamespaced()
public function testGetsLinkFromAtom03()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath . '/link/plain/atom03.xml')
+ file_get_contents($this->feedSamplePath . '/link/plain/atom03.xml')
);
$entry = $feed->current();
$this->assertEquals('http://www.example.com/entry', $entry->getLink());
@@ -348,7 +348,7 @@ public function testGetsLinkFromAtom03()
public function testGetsLinkFromAtom10()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath . '/link/plain/atom10.xml')
+ file_get_contents($this->feedSamplePath . '/link/plain/atom10.xml')
);
$entry = $feed->current();
$this->assertEquals('http://www.example.com/entry', $entry->getLink());
@@ -357,7 +357,7 @@ public function testGetsLinkFromAtom10()
public function testGetsLinkFromAtom10_WithNoRelAttribute()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath . '/link/plain/atom10-norel.xml')
+ file_get_contents($this->feedSamplePath . '/link/plain/atom10-norel.xml')
);
$entry = $feed->current();
$this->assertEquals('http://www.example.com/entry', $entry->getLink());
@@ -366,7 +366,7 @@ public function testGetsLinkFromAtom10_WithNoRelAttribute()
public function testGetsLinkFromAtom10_WithRelativeUrl()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath . '/link/plain/atom10-relative.xml')
+ file_get_contents($this->feedSamplePath . '/link/plain/atom10-relative.xml')
);
$entry = $feed->current();
$this->assertEquals('http://www.example.com/entry', $entry->getLink());
@@ -378,7 +378,7 @@ public function testGetsLinkFromAtom10_WithRelativeUrl()
public function testGetsBaseUriFromAtom10_FromFeedElement()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath . '/baseurl/plain/atom10-feedlevel.xml')
+ file_get_contents($this->feedSamplePath . '/baseurl/plain/atom10-feedlevel.xml')
);
$entry = $feed->current();
$this->assertEquals('http://www.example.com', $entry->getBaseUrl());
@@ -387,7 +387,7 @@ public function testGetsBaseUriFromAtom10_FromFeedElement()
public function testGetsBaseUriFromAtom10_FromEntryElement()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath . '/baseurl/plain/atom10-entrylevel.xml')
+ file_get_contents($this->feedSamplePath . '/baseurl/plain/atom10-entrylevel.xml')
);
$entry = $feed->current();
$this->assertEquals('http://www.example.com/', $entry->getBaseUrl());
@@ -399,7 +399,7 @@ public function testGetsBaseUriFromAtom10_FromEntryElement()
public function testGetsCommentLinkFromAtom03()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath . '/commentlink/plain/atom03.xml')
+ file_get_contents($this->feedSamplePath . '/commentlink/plain/atom03.xml')
);
$entry = $feed->current();
$this->assertEquals('http://www.example.com/entry/comments', $entry->getCommentLink());
@@ -408,7 +408,7 @@ public function testGetsCommentLinkFromAtom03()
public function testGetsCommentLinkFromAtom10()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath . '/commentlink/plain/atom10.xml')
+ file_get_contents($this->feedSamplePath . '/commentlink/plain/atom10.xml')
);
$entry = $feed->current();
$this->assertEquals('http://www.example.com/entry/comments', $entry->getCommentLink());
@@ -417,7 +417,7 @@ public function testGetsCommentLinkFromAtom10()
public function testGetsCommentLinkFromAtom10_RelativeLinks()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath . '/commentlink/plain/atom10-relative.xml')
+ file_get_contents($this->feedSamplePath . '/commentlink/plain/atom10-relative.xml')
);
$entry = $feed->current();
$this->assertEquals('http://www.example.com/entry/comments', $entry->getCommentLink());
@@ -432,20 +432,20 @@ public function testGetsCommentLinkFromAtom10_RelativeLinks()
public function testGetsCategoriesFromAtom10()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath.'/category/plain/atom10.xml')
+ file_get_contents($this->feedSamplePath.'/category/plain/atom10.xml')
);
$entry = $feed->current();
- $this->assertEquals($this->_expectedCats, (array) $entry->getCategories());
+ $this->assertEquals($this->expectedCats, (array) $entry->getCategories());
$this->assertEquals(array('topic1','Cat & Dog'), array_values($entry->getCategories()->getValues()));
}
public function testGetsCategoriesFromAtom03_Atom10Extension()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath.'/category/plain/atom03.xml')
+ file_get_contents($this->feedSamplePath.'/category/plain/atom03.xml')
);
$entry = $feed->current();
- $this->assertEquals($this->_expectedCats, (array) $entry->getCategories());
+ $this->assertEquals($this->expectedCats, (array) $entry->getCategories());
$this->assertEquals(array('topic1','Cat & Dog'), array_values($entry->getCategories()->getValues()));
}
@@ -454,20 +454,20 @@ public function testGetsCategoriesFromAtom03_Atom10Extension()
public function testGetsCategoriesFromAtom03_Dc10()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath.'/category/plain/dc10/atom03.xml')
+ file_get_contents($this->feedSamplePath.'/category/plain/dc10/atom03.xml')
);
$entry = $feed->current();
- $this->assertEquals($this->_expectedCatsDc, (array) $entry->getCategories());
+ $this->assertEquals($this->expectedCatsDc, (array) $entry->getCategories());
$this->assertEquals(array('topic1','topic2'), array_values($entry->getCategories()->getValues()));
}
public function testGetsCategoriesFromAtom03_Dc11()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath.'/category/plain/dc11/atom03.xml')
+ file_get_contents($this->feedSamplePath.'/category/plain/dc11/atom03.xml')
);
$entry = $feed->current();
- $this->assertEquals($this->_expectedCatsDc, (array) $entry->getCategories());
+ $this->assertEquals($this->expectedCatsDc, (array) $entry->getCategories());
$this->assertEquals(array('topic1','topic2'), array_values($entry->getCategories()->getValues()));
}
@@ -476,7 +476,7 @@ public function testGetsCategoriesFromAtom03_Dc11()
public function testGetsCategoriesFromAtom10_None()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath.'/category/plain/none/atom10.xml')
+ file_get_contents($this->feedSamplePath.'/category/plain/none/atom10.xml')
);
$entry = $feed->current();
$this->assertEquals(array(), (array) $entry->getCategories());
@@ -486,7 +486,7 @@ public function testGetsCategoriesFromAtom10_None()
public function testGetsCategoriesFromAtom03_None()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath.'/category/plain/none/atom03.xml')
+ file_get_contents($this->feedSamplePath.'/category/plain/none/atom03.xml')
);
$entry = $feed->current();
$this->assertEquals(array(), (array) $entry->getCategories());
View
28 tests/ZendTest/Feed/Reader/Entry/CommonTest.php
@@ -23,12 +23,12 @@
class CommonTest extends \PHPUnit_Framework_TestCase
{
- protected $_feedSamplePath = null;
+ protected $feedSamplePath = null;
public function setup()
{
Reader\Reader::reset();
- $this->_feedSamplePath = dirname(__FILE__) . '/_files/Common';
+ $this->feedSamplePath = dirname(__FILE__) . '/_files/Common';
}
/**
@@ -37,7 +37,7 @@ public function setup()
public function testGetsDomDocumentObject()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath.'/atom.xml')
+ file_get_contents($this->feedSamplePath.'/atom.xml')
);
$entry = $feed->current();
$this->assertTrue($entry->getDomDocument() instanceof \DOMDocument);
@@ -46,7 +46,7 @@ public function testGetsDomDocumentObject()
public function testGetsDomXpathObject()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath.'/atom.xml')
+ file_get_contents($this->feedSamplePath.'/atom.xml')
);
$entry = $feed->current();
$this->assertTrue($entry->getXpath() instanceof \DOMXPath);
@@ -55,7 +55,7 @@ public function testGetsDomXpathObject()
public function testGetsXpathPrefixString()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath.'/atom.xml')
+ file_get_contents($this->feedSamplePath.'/atom.xml')
);
$entry = $feed->current();
$this->assertEquals('//atom:entry[1]', $entry->getXpathPrefix());
@@ -64,7 +64,7 @@ public function testGetsXpathPrefixString()
public function testGetsDomElementObject()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath.'/atom.xml')
+ file_get_contents($this->feedSamplePath.'/atom.xml')
);
$entry = $feed->current();
$this->assertTrue($entry->getElement() instanceof \DOMElement);
@@ -73,16 +73,16 @@ public function testGetsDomElementObject()
public function testSaveXmlOutputsXmlStringForEntry()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath.'/atom.xml')
+ file_get_contents($this->feedSamplePath.'/atom.xml')
);
$entry = $feed->current();
- $this->assertEquals($entry->saveXml(), file_get_contents($this->_feedSamplePath.'/atom_rewrittenbydom.xml'));
+ $this->assertEquals($entry->saveXml(), file_get_contents($this->feedSamplePath.'/atom_rewrittenbydom.xml'));
}
public function testGetsNamedExtension()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath.'/atom.xml')
+ file_get_contents($this->feedSamplePath.'/atom.xml')
);
$entry = $feed->current();
$this->assertTrue($entry->getExtension('Atom') instanceof Extension\Atom\Entry);
@@ -91,7 +91,7 @@ public function testGetsNamedExtension()
public function testReturnsNullIfExtensionDoesNotExist()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath.'/atom.xml')
+ file_get_contents($this->feedSamplePath.'/atom.xml')
);
$entry = $feed->current();
$this->assertEquals(null, $entry->getExtension('Foo'));
@@ -103,7 +103,7 @@ public function testReturnsNullIfExtensionDoesNotExist()
public function testReturnsEncodingOfFeed()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath.'/atom.xml')
+ file_get_contents($this->feedSamplePath.'/atom.xml')
);
$entry = $feed->current();
$this->assertEquals('UTF-8', $entry->getEncoding());
@@ -115,7 +115,7 @@ public function testReturnsEncodingOfFeed()
public function testReturnsEncodingOfFeedAsUtf8IfUndefined()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath.'/atom_noencodingdefined.xml')
+ file_get_contents($this->feedSamplePath.'/atom_noencodingdefined.xml')
);
$entry = $feed->current();
$this->assertEquals('UTF-8', $entry->getEncoding());
@@ -127,7 +127,7 @@ public function testReturnsEncodingOfFeedAsUtf8IfUndefined()
public function testFeedEntryCanDetectFeedType()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath.'/atom.xml')
+ file_get_contents($this->feedSamplePath.'/atom.xml')
);
$entry = $feed->current();
$stub = $this->getMockForAbstractClass(
@@ -143,7 +143,7 @@ public function testFeedEntryCanDetectFeedType()
public function testFeedEntryCanSetAnyType()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath.'/atom.xml')
+ file_get_contents($this->feedSamplePath.'/atom.xml')
);
$entry = $feed->current();
$domElement = new \DOMElement($entry->getElement()->tagName);
View
612 tests/ZendTest/Feed/Reader/Entry/RssTest.php
306 additions, 306 deletions not shown
View
46 tests/ZendTest/Feed/Reader/Feed/AtomSourceTest.php
@@ -23,19 +23,19 @@
class AtomSourceTest extends \PHPUnit_Framework_TestCase
{
- protected $_feedSamplePath = null;
+ protected $feedSamplePath = null;
- protected $_options = array();
+ protected $options = array();
- protected $_expectedCats = array();
+ protected $expectedCats = array();
- protected $_expectedCatsDc = array();
+ protected $expectedCatsDc = array();
public function setup()
{
Reader\Reader::reset();
- $this->_feedSamplePath = dirname(__FILE__) . '/_files/AtomSource';
- $this->_expectedCats = array(
+ $this->feedSamplePath = dirname(__FILE__) . '/_files/AtomSource';
+ $this->expectedCats = array(
array(
'term' => 'topic1',
'scheme' => 'http://example.com/schema1',
@@ -52,7 +52,7 @@ public function setup()
'label' => 'Cat & Dog'
)
);
- $this->_expectedCatsDc = array(
+ $this->expectedCatsDc = array(
array(
'term' => 'topic1',
'scheme' => null,
@@ -69,7 +69,7 @@ public function setup()
public function testGetsSourceFromEntry()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath.'/title/atom10.xml')
+ file_get_contents($this->feedSamplePath.'/title/atom10.xml')
);
$source = $feed->current()->getSource();
$this->assertTrue($source instanceof Reader\Feed\Atom\Source);
@@ -82,7 +82,7 @@ public function testGetsSourceFromEntry()
public function testGetsTitleFromAtom10()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath.'/title/atom10.xml')
+ file_get_contents($this->feedSamplePath.'/title/atom10.xml')
);
$source = $feed->current()->getSource();
$this->assertEquals('My Title', $source->getTitle());
@@ -95,7 +95,7 @@ public function testGetsTitleFromAtom10()
public function testGetsAuthorArrayFromAtom10()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath.'/author/atom10.xml')
+ file_get_contents($this->feedSamplePath.'/author/atom10.xml')
);
$source = $feed->current()->getSource();
@@ -118,7 +118,7 @@ public function testGetsAuthorArrayFromAtom10()
public function testGetsSingleAuthorFromAtom10()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath.'/author/atom10.xml')
+ file_get_contents($this->feedSamplePath.'/author/atom10.xml')
);
$source = $feed->current()->getSource();
@@ -132,7 +132,7 @@ public function testGetsSingleAuthorFromAtom10()
public function testGetsDateCreatedFromAtom10()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath . '/datecreated/atom10.xml')
+ file_get_contents($this->feedSamplePath . '/datecreated/atom10.xml')
);
$source = $feed->current()->getSource();
@@ -147,7 +147,7 @@ public function testGetsDateCreatedFromAtom10()
public function testGetsDateModifiedFromAtom10()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath . '/datemodified/atom10.xml')
+ file_get_contents($this->feedSamplePath . '/datemodified/atom10.xml')
);
$source = $feed->current()->getSource();
@@ -162,7 +162,7 @@ public function testGetsDateModifiedFromAtom10()
public function testGetsGeneratorFromAtom10()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath.'/generator/atom10.xml')
+ file_get_contents($this->feedSamplePath.'/generator/atom10.xml')
);
$source = $feed->current()->getSource();
$this->assertEquals('Zend_Feed', $source->getGenerator());
@@ -175,7 +175,7 @@ public function testGetsGeneratorFromAtom10()
public function testGetsCopyrightFromAtom10()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath.'/copyright/atom10.xml')
+ file_get_contents($this->feedSamplePath.'/copyright/atom10.xml')
);
$source = $feed->current()->getSource();
$this->assertEquals('Copyright 2008', $source->getCopyright());
@@ -188,7 +188,7 @@ public function testGetsCopyrightFromAtom10()
public function testGetsDescriptionFromAtom10()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath.'/description/atom10.xml')
+ file_get_contents($this->feedSamplePath.'/description/atom10.xml')
);
$source = $feed->current()->getSource();
$this->assertEquals('My Description', $source->getDescription());
@@ -201,7 +201,7 @@ public function testGetsDescriptionFromAtom10()
public function testGetsIdFromAtom10()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath.'/id/atom10.xml')
+ file_get_contents($this->feedSamplePath.'/id/atom10.xml')
);
$source = $feed->current()->getSource();
$this->assertEquals('123', $source->getId());
@@ -214,7 +214,7 @@ public function testGetsIdFromAtom10()
public function testGetsLanguageFromAtom10()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath.'/language/atom10.xml')
+ file_get_contents($this->feedSamplePath.'/language/atom10.xml')
);
$source = $feed->current()->getSource();
$this->assertEquals('en-GB', $source->getLanguage());
@@ -227,7 +227,7 @@ public function testGetsLanguageFromAtom10()
public function testGetsLinkFromAtom10()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath.'/link/atom10.xml')
+ file_get_contents($this->feedSamplePath.'/link/atom10.xml')
);
$source = $feed->current()->getSource();
$this->assertEquals('http://www.example.com', $source->getLink());
@@ -240,7 +240,7 @@ public function testGetsLinkFromAtom10()
public function testGetsFeedLinkFromAtom10()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath.'/feedlink/atom10.xml')
+ file_get_contents($this->feedSamplePath.'/feedlink/atom10.xml')
);
$source = $feed->current()->getSource();
$this->assertEquals('http://www.example.com/feed/atom', $source->getFeedLink());
@@ -252,7 +252,7 @@ public function testGetsFeedLinkFromAtom10()
public function testGetsHubsFromAtom10()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath.'/hubs/atom10.xml')
+ file_get_contents($this->feedSamplePath.'/hubs/atom10.xml')
);
$source = $feed->current()->getSource();
$this->assertEquals(array(
@@ -267,10 +267,10 @@ public function testGetsHubsFromAtom10()
public function testGetsCategoriesFromAtom10()
{
$feed = Reader\Reader::importString(
- file_get_contents($this->_feedSamplePath.'/category/atom10.xml')
+ file_get_contents($this->feedSamplePath.'/category/atom10.xml')
);
$source = $feed->current()->getSource();
- $this->assertEquals($this->_expectedCats, (array) $source->getCategories());
+ $this->assertEquals($this->expectedCats, (array) $source->getCategories());
$this->assertEquals(array('topic1','Cat & Dog'), array_values($source->getCategories()->getValues()));
}
View
108 tests/ZendTest/Feed/Reader/Feed/AtomTest.php
@@ -23,20 +23,20 @@
class AtomTest extends \PHPUnit_Framework_TestCase
{
- protected $_feedSamplePath = null;
+ protected $feedSamplePath = null;
- protected $_options = array();
+ protected $options = array();
- protected $_expectedCats = array();
+ protected $expectedCats = array();
- protected $_expectedCatsDc = array();
+ protected $expectedCatsDc = array();
public function setup()
{
Reader\Reader::reset();
- $this->_feedSamplePath = dirname(__FILE__) . '/_files/Atom';
+ $this->feedSamplePath = dirname(__FILE__) . '/_files/Atom';
- $this->_expectedCats = array(
+ $this->expectedCats = array(
array(
'term' => 'topic1',
'scheme' => 'http://example.com/schema1',
@@ -53,7 +53,7 @@ public function setup()
'label' => 'Cat & Dog'
)
);
- $this->_expectedCatsDc = array(
+ $this->expectedCatsDc = array(
array(
'term' => 'topic1',
'scheme' => null,
@@ -73,7 +73,7 @@ public function setup()
public function testGetsTitleFromAtom03()
{
$feed = Reader\Reader::importString(