コード例 #1
0
ファイル: AtomTest.php プロジェクト: pnaq57/zf2demo
 public function setup()
 {
     Reader\Reader::reset();
     $this->feedSamplePath = dirname(__FILE__) . '/_files/Atom';
     $this->expectedCats = array(array('term' => 'topic1', 'scheme' => 'http://example.com/schema1', 'label' => 'topic1'), array('term' => 'topic1', 'scheme' => 'http://example.com/schema2', 'label' => 'topic1'), array('term' => 'cat_dog', 'scheme' => 'http://example.com/schema1', 'label' => 'Cat & Dog'));
     $this->expectedCatsDc = array(array('term' => 'topic1', 'scheme' => null, 'label' => 'topic1'), array('term' => 'topic2', 'scheme' => null, 'label' => 'topic2'));
 }
コード例 #2
0
ファイル: CommonTest.php プロジェクト: alab1001101/zf2
 public function setup()
 {
     Reader\Reader::reset();
     if (\Zend\Registry::isRegistered('Zend_Locale')) {
         $registry = \Zend\Registry::getInstance();
         unset($registry['Zend_Locale']);
     }
     $this->_feedSamplePath = dirname(__FILE__) . '/_files/Common';
 }
コード例 #3
0
 public function setup()
 {
     Reader\Reader::reset();
     $this->_feedSamplePath = dirname(__FILE__) . '/_files/podcast.xml';
     $this->_options = Date\Date::setOptions();
     foreach($this->_options as $k=>$v) {
         if (is_null($v)) {
             unset($this->_options[$k]);
         }
     }
     Date\Date::setOptions(array('format_type'=>'iso'));
 }
コード例 #4
0
 function setUp()
 {
     parent::setUp();
     // Do not delete old aggregator items during these tests, since our sample
     // feeds have hardcoded dates in them (which may be expired when this test
     // is run).
     $this->container->get('config.factory')->get('aggregator.settings')->set('items.expire', AGGREGATOR_CLEAR_NEVER)->save();
     // Reset any reader cache between tests.
     Reader::reset();
     // Set our bridge extension manager to Zend Feed.
     $bridge = $this->container->get('feed.bridge.reader');
     Reader::setExtensionManager($bridge);
 }
コード例 #5
0
ファイル: AtomSourceTest.php プロジェクト: niallmccrudden/zf2
 public function setup()
 {
     Reader\Reader::reset();
     if (\Zend\Registry::isRegistered('Zend_Locale')) {
         $registry = \Zend\Registry::getInstance();
         unset($registry['Zend_Locale']);
     }
     $this->_feedSamplePath = dirname(__FILE__) . '/_files/AtomSource';
     $this->_options = Date\Date::setOptions();
     foreach($this->_options as $k=>$v) {
         if (is_null($v)) {
             unset($this->_options[$k]);
         }
     }
     Date\Date::setOptions(array('format_type'=>'iso'));
     $this->_expectedCats = array(
         array(
             'term' => 'topic1',
             'scheme' => 'http://example.com/schema1',
             'label' => 'topic1'
         ),
         array(
             'term' => 'topic1',
             'scheme' => 'http://example.com/schema2',
             'label' => 'topic1'
         ),
         array(
             'term' => 'cat_dog',
             'scheme' => 'http://example.com/schema1',
             'label' => 'Cat & Dog'
         )
     );
     $this->_expectedCatsDc = array(
         array(
             'term' => 'topic1',
             'scheme' => null,
             'label' => 'topic1'
         ),
         array(
             'term' => 'topic2',
             'scheme' => null,
             'label' => 'topic2'
         )
     );
 }
コード例 #6
0
 public function setup()
 {
     Reader\Reader::reset();
     $this->feedSamplePath = dirname(__FILE__) . '/_files/h-online.com-atom10.xml';
 }
コード例 #7
0
ファイル: ReaderTest.php プロジェクト: bradley-holt/zf2
 public function tearDown()
 {
     Reader\Reader::reset();
 }
コード例 #8
0
 public function setup()
 {
     Reader\Reader::reset();
     $this->feedSamplePath = dirname(__FILE__) . '/_files/laut.de-rdf.xml';
 }
コード例 #9
0
 public function setup()
 {
     Reader\Reader::reset();
     $this->feedSamplePath = dirname(__FILE__) . '/_files/wordpress-rss2-dc-atom.xml';
 }
コード例 #10
0
ファイル: CommonTest.php プロジェクト: haoyanfei/zf2
 public function setup()
 {
     Reader\Reader::reset();
     $this->_feedSamplePath = dirname(__FILE__) . '/_files/Common';
 }