Changeset 1649
- Timestamp:
- 06/23/08 23:40:18 (4 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/main/php/net/stubbles/xml/rss/stubRSSProcessor.php
r1594 r1649 25 25 { 26 26 /** 27 * registry key for the feeds config file28 */29 const KEY_FEEDS_FILE = 'net.stubbles.xml.rss.feeds';30 /**31 27 * list of configured feeds 32 28 * … … 40 36 protected function doConstruct() 41 37 { 42 $this->feeds = $this->loadFeeds(stubConfig::getConfigPath() . DIRECTORY_SEPARATOR . stubRegistry::getConfig(self::KEY_FEEDS_FILE, 'rss-feeds.ini'));38 $this->feeds = $this->loadFeeds(stubConfig::getConfigPath() . DIRECTORY_SEPARATOR . 'rss-feeds.ini'); 43 39 } 44 40 trunk/src/test/php/net/stubbles/xml/rss/stubRSSProcessorTestCase.php
r1595 r1649 108 108 ->method('loadFeeds') 109 109 ->with($this->equalTo(stubConfig::getConfigPath() . DIRECTORY_SEPARATOR . 'rss-feeds.ini')); 110 $rssProcessor->callDoConstruct();111 }112 113 /**114 * construction with configured config file should use configured config file115 *116 * @test117 */118 public function constructionWithSpecialConfigFile()119 {120 stubRegistry::setConfig(stubRSSProcessor::KEY_FEEDS_FILE, 'rss-test.ini');121 $rssProcessor = $this->getMock('TeststubRSSProcessor',122 array('loadFeeds'),123 array($this->mockRequest,124 $this->mockSession,125 $this->mockResponse126 )127 );128 $rssProcessor->expects($this->once())129 ->method('loadFeeds')130 ->with($this->equalTo(stubConfig::getConfigPath() . DIRECTORY_SEPARATOR . 'rss-test.ini'));131 110 $rssProcessor->callDoConstruct(); 132 111 }
