contrib modules security updates

This commit is contained in:
Bachir Soussi Chiadmi
2016-10-13 12:10:40 +02:00
parent ffd758abc9
commit 747127f643
732 changed files with 67976 additions and 23207 deletions

View File

@@ -9,26 +9,28 @@
* Test single feeds.
*/
class FeedsSyndicationParserTestCase extends FeedsWebTestCase {
public static function getInfo() {
return array(
'name' => 'Syndication parsers',
'description' => 'Regression tests for syndication parsers Common syndication and SimplePie. Tests parsers against a set of feeds in the context of Feeds module. <strong>Requires SimplePie parser to be configured correctly.</strong>',
'group' => 'Feeds',
'dependencies' => array('libraries'),
);
}
/**
* Set up test.
*/
public function setUp() {
parent::setUp(array('libraries'));
}
/**
* Run tests.
*/
public function test() {
// Only download simplepie if the plugin doesn't already exist somewhere.
// People running tests locally might have it.
if (!feeds_simplepie_exists()) {
$this->downloadExtractSimplePie('1.3');
$this->assertTrue(feeds_simplepie_exists());
// Reset all the caches!
$this->resetAll();
}
$this->createImporterConfiguration('Syndication', 'syndication');
foreach (array('FeedsSyndicationParser', 'FeedsSimplePieParser') as $parser) {
@@ -38,6 +40,15 @@ class FeedsSyndicationParserTestCase extends FeedsWebTestCase {
$this->assertText('Created ' . $assertions['item_count'] . ' nodes');
}
}
feeds_include_simplepie();
variable_set('feeds_never_use_curl', TRUE);
$link = $GLOBALS['base_url'] . '/testing/feeds/flickr.xml';
$enclosure = new FeedsSimplePieEnclosure(new SimplePie_Enclosure($link));
$enclosure->setAllowedExtensions('xml');
$this->assertEqual(1, $enclosure->getFile('public://')->fid);
}
/**
@@ -54,4 +65,5 @@ class FeedsSyndicationParserTestCase extends FeedsWebTestCase {
),
);
}
}