public function setUp() { $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(); $this->storage = $this->_getCleanMock('\\Zend\\Feed\\PubSubHubbub\\Model\\Subscription'); $this->subscriber->setStorage($this->storage); } else { // Skip tests $this->markTestSkipped('Zend\\Feed\\PubSubHubbub\\Subscriber dynamic tests are not enabled in TestConfiguration.php'); } }
public function testCanSetStorageImplementation() { $storage = new Subscription($this->tableGateway); $this->subscriber->setStorage($storage); $this->assertThat($this->subscriber->getStorage(), $this->identicalTo($storage)); }