Closed (fixed)
Project:
Twitter
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
16 Nov 2011 at 14:12 UTC
Updated:
4 Jan 2014 at 01:11 UTC
Jump to comment: Most recent
Comments
Comment #1
AlessMascherpa commentedI found those post that might be helpful:
- Testing using mock module I guy trying to do the same as (or similar to) what we are trying to do in the Twitter DrupalContribute.
- #785362: Create more extensive guidelines for "mock module" creation and style
- #786156: Update the SimpleTest tutorial to reflect the 'mock module' pattern.
I also recommend to check the Services module. Not only because its a good example on how to do this with a mock module (see tests dir of the module), despite it does in other way that the one presented in Mock Web Service for Simpletest, also because it could be good to use its API to interact with other systems. As a matter of fact, its 4th version is going to be the starting point of web services API in core of D8 (read: http://www.garfieldtech.com/blog/web-services-initiative ("The road ahead" point)). This last point might be more appropriate in future versions of Twitter module.
Cheers,
Alessandro Mascherpa.
Comment #2
juampynr commentedNow it is very easy to change the host: http://drupal.org/node/1346790#comment-5293692
It is time to focus in the mock server.
Comment #3
juampynr commentedAdded a test suite to test actions where Twitter uses Oauth (ie. pulling tweets, posting and signing in).
A mock server has been added as a submodule within the tests directory and a dummy call was made to it with success. The next step is to see how to simulate an account addition with this.
http://drupalcode.org/project/twitter.git/commitdiff/ce72c50c05b5d03857f...
Comment #4
juampynr commentedMoved to 7.x branch.
Comment #5
juampynr commentedChanged from Singleton to Drupal variables. Now the mock class can change hostnames to simulate the Twitter API.
http://drupalcode.org/project/twitter.git/commitdiff/6783e46
http://drupalcode.org/project/twitter.git/commitdiff/21683a9