Do not rely on active internet connection and 3rd party server at the tests
Aron Novak - August 27, 2009 - 08:47
| Project: | FeedAPI |
| Version: | 6.x-1.x-dev |
| Component: | Code (general) |
| Category: | task |
| Priority: | critical |
| Assigned: | Aron Novak |
| Status: | closed |
Description
All of the test cases depend on a 3rd party server and internet connection.
All of the test XML files should be hosted locally, inside the module tests directory.

#1
Obvious.
#2
url() will break the tests if clean urls is not enabled. Use global $base_url instead.
#3
#2: why do you think so? http://api.drupal.org/api/function/url/6 - it seems that this function is aware of clean url setting.
#4
Because when you build a url for a file, you don't want a query string in your url. The code as it stands right now, would create URLs that look like:
http://localhost?q=tests/files/test_feed.rss
which would break, because tests/files/test_feed.rss is not served from Drupal but from a file and therefore always needs to be
http://localhost/tests/files/test_feed.rss
#5
#4: thanks for the explanation!
Here i added a wrapper to generate test file URLs and using base_url of course.
The previous patch seems to be bogus also, cause a dynamic .php feed remained in the test suite. Now it's all good, can be executed without net connection
#6
Committed.
All of the tests can be executed w/o net connection (although a bit slower)
#7
Automatically closed -- issue fixed for 2 weeks with no activity.