Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
feeds
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
drupal.org
feeds
Commits
247a9542
Commit
247a9542
authored
15 years ago
by
Will White
Browse files
Options
Downloads
Patches
Plain Diff
bug report #622932 by pounard: Fix SQL capitalization.
parent
2aca9cb0
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
CHANGELOG.txt
+1
-0
1 addition, 0 deletions
CHANGELOG.txt
feeds_defaults/tests/feeds_defaults.test
+1
-1
1 addition, 1 deletion
feeds_defaults/tests/feeds_defaults.test
tests/feeds.test
+4
-4
4 additions, 4 deletions
tests/feeds.test
tests/feeds.test.inc
+3
-3
3 additions, 3 deletions
tests/feeds.test.inc
with
9 additions
and
8 deletions
CHANGELOG.txt
+
1
−
0
View file @
247a9542
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
feeds_defaults/tests/feeds_defaults.test
+
1
−
1
View file @
247a9542
...
@@ -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.'
);
...
...
This diff is collapsed.
Click to expand it.
tests/feeds.test
+
4
−
4
View file @
247a9542
...
@@ -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
);
}
}
...
...
This diff is collapsed.
Click to expand it.
tests/feeds.test.inc
+
3
−
3
View file @
247a9542
...
@@ -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.'
));
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment