Skip to content
Snippets Groups Projects
Commit 247a9542 authored by Will White's avatar Will White
Browse files

bug report #622932 by pounard: Fix SQL capitalization.

parent 2aca9cb0
No related branches found
No related tags found
No related merge requests found
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
Feeds 6.x 1.0 xxxxx xx, 2010-xx-xx Feeds 6.x 1.0 xxxxx xx, 2010-xx-xx
---------------------------------- ----------------------------------
- #622932 pounard: Fix SQL capitalization.
- #622932 pounard: Fix non-standard SQL (PostgreSQL compatibility) - #622932 pounard: Fix non-standard SQL (PostgreSQL compatibility)
- #705872 Scott Reynolds: Added HTTPFetcher autodiscovery - #705872 Scott Reynolds: Added HTTPFetcher autodiscovery
- #740962 alex_b: Fix FileFetcher Attached to Feed Node, Upload Field Not Saving File - #740962 alex_b: Fix FileFetcher Attached to Feed Node, Upload Field Not Saving File
......
...@@ -131,7 +131,7 @@ class FeedsDefaultsFeedTestCase extends FeedsDefaultsTestCase { ...@@ -131,7 +131,7 @@ class FeedsDefaultsFeedTestCase extends FeedsDefaultsTestCase {
// Create a batch of nodes. // Create a batch of nodes.
$this->createFeedNodes('feed', 10, 'feed'); $this->createFeedNodes('feed', 10, 'feed');
$count = db_result(db_query("SELECT COUNT(*) from {node} WHERE type = 'feed_item'")); $count = db_result(db_query("SELECT COUNT(*) FROM {node} WHERE type = 'feed_item'"));
$this->assertEqual($count, 100, 'Imported 100 nodes.'); $this->assertEqual($count, 100, 'Imported 100 nodes.');
$count = db_result(db_query("SELECT COUNT(*) FROM {feeds_node_item}")); $count = db_result(db_query("SELECT COUNT(*) FROM {feeds_node_item}"));
$this->assertEqual($count, 100, 'Found 100 records in feeds_node_item.'); $this->assertEqual($count, 100, 'Found 100 records in feeds_node_item.');
......
...@@ -666,7 +666,7 @@ class FeedsSchedulerTestCase extends FeedsWebTestCase { ...@@ -666,7 +666,7 @@ class FeedsSchedulerTestCase extends FeedsWebTestCase {
// There should be feeds_schedule_num (= 10) feeds updated now. // There should be feeds_schedule_num (= 10) feeds updated now.
$schedule = array(); $schedule = array();
$count = db_result(db_query("select COUNT(*) from {feeds_schedule} WHERE last_executed_time <> 0")); $count = db_result(db_query("SELECT COUNT(*) FROM {feeds_schedule} WHERE last_executed_time <> 0"));
$this->assertEqual($count, 10, '10 feeds refreshed on cron.'); $this->assertEqual($count, 10, '10 feeds refreshed on cron.');
// There should be 100 story nodes in the database. // There should be 100 story nodes in the database.
...@@ -679,7 +679,7 @@ class FeedsSchedulerTestCase extends FeedsWebTestCase { ...@@ -679,7 +679,7 @@ class FeedsSchedulerTestCase extends FeedsWebTestCase {
// There should be feeds_schedule_num X 2 (= 20) feeds updated now. // There should be feeds_schedule_num X 2 (= 20) feeds updated now.
$schedule = array(); $schedule = array();
$result = db_query("select feed_nid, last_executed_time, scheduled from {feeds_schedule} WHERE last_executed_time <> 0"); $result = db_query("SELECT feed_nid, last_executed_time, scheduled FROM {feeds_schedule} WHERE last_executed_time <> 0");
while ($row = db_fetch_object($result)) { while ($row = db_fetch_object($result)) {
$schedule[$row->feed_nid] = $row; $schedule[$row->feed_nid] = $row;
} }
...@@ -701,7 +701,7 @@ class FeedsSchedulerTestCase extends FeedsWebTestCase { ...@@ -701,7 +701,7 @@ class FeedsSchedulerTestCase extends FeedsWebTestCase {
// The import_period setting of the feed configuration is 1800, there // The import_period setting of the feed configuration is 1800, there
// shouldn't be any change to the database now. // shouldn't be any change to the database now.
$equal = TRUE; $equal = TRUE;
$result = db_query("select feed_nid, last_executed_time, scheduled from {feeds_schedule} WHERE last_executed_time <> 0"); $result = db_query("SELECT feed_nid, last_executed_time, scheduled FROM {feeds_schedule} WHERE last_executed_time <> 0");
while ($row = db_fetch_object($result)) { while ($row = db_fetch_object($result)) {
$equal = $equal && ($row->last_executed_time == $schedule[$row->feed_nid]->last_executed_time); $equal = $equal && ($row->last_executed_time == $schedule[$row->feed_nid]->last_executed_time);
} }
...@@ -731,7 +731,7 @@ class FeedsSchedulerTestCase extends FeedsWebTestCase { ...@@ -731,7 +731,7 @@ class FeedsSchedulerTestCase extends FeedsWebTestCase {
// There should not be more nodes than before. // There should not be more nodes than before.
$equal = FALSE; $equal = FALSE;
$output = ''; $output = '';
$result = db_query("select feed_nid, last_executed_time, scheduled from {feeds_schedule} WHERE last_executed_time <> 0"); $result = db_query("SELECT feed_nid, last_executed_time, scheduled FROM {feeds_schedule} WHERE last_executed_time <> 0");
while ($row = db_fetch_object($result)) { while ($row = db_fetch_object($result)) {
$equal = $equal || ($row->last_executed_time == $schedule[$row->feed_nid]->last_executed_time); $equal = $equal || ($row->last_executed_time == $schedule[$row->feed_nid]->last_executed_time);
} }
......
...@@ -176,8 +176,8 @@ class FeedsWebTestCase extends DrupalWebTestCase { ...@@ -176,8 +176,8 @@ class FeedsWebTestCase extends DrupalWebTestCase {
$this->assertTrue(is_numeric($nid), 'Found node id ('. $nid .').'); $this->assertTrue(is_numeric($nid), 'Found node id ('. $nid .').');
// Check whether feed got recorded in feeds_source table. // Check whether feed got recorded in feeds_source table.
$this->assertEqual(1, db_result(db_query("select COUNT(*) from {feeds_source} WHERE id = '%s' AND feed_nid = %d", $id, $nid))); $this->assertEqual(1, db_result(db_query("SELECT COUNT(*) FROM {feeds_source} WHERE id = '%s' AND feed_nid = %d", $id, $nid)));
$source = db_fetch_object(db_query("select * from {feeds_source} WHERE id = '%s' AND feed_nid = %d", $id, $nid)); $source = db_fetch_object(db_query("SELECT * FROM {feeds_source} WHERE id = '%s' AND feed_nid = %d", $id, $nid));
$config = unserialize($source->config); $config = unserialize($source->config);
$this->assertEqual($config['FeedsHTTPFetcher']['source'], $feed_url, t('URL in DB correct.')); $this->assertEqual($config['FeedsHTTPFetcher']['source'], $feed_url, t('URL in DB correct.'));
...@@ -209,7 +209,7 @@ class FeedsWebTestCase extends DrupalWebTestCase { ...@@ -209,7 +209,7 @@ class FeedsWebTestCase extends DrupalWebTestCase {
$this->assertText('has been updated.'); $this->assertText('has been updated.');
// Check that the URL was updated in the feeds_source table. // Check that the URL was updated in the feeds_source table.
$source = db_fetch_object(db_query("select * from {feeds_source} WHERE feed_nid = %d", $nid)); $source = db_fetch_object(db_query("SELECT * FROM {feeds_source} WHERE feed_nid = %d", $nid));
$config = unserialize($source->config); $config = unserialize($source->config);
$this->assertEqual($config['FeedsHTTPFetcher']['source'], $feed_url, t('URL in DB correct.')); $this->assertEqual($config['FeedsHTTPFetcher']['source'], $feed_url, t('URL in DB correct.'));
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment