Comments (4)
@philipjohn I went ahead and implemented the interceptor for the XMLRPC push syndications. You can see how it was implemented here:
It's somewhat hackish, but it works and implements a real XMLRPC service, so that tests are pretty solid. It also uses a multisite instance to send the requests from one blog to another and tests the results on the other side.
Let me know your thoughts. PR #136 is ready for final review. It doesn't include REST tests because I will write those as part of issue #116
from syndication.
Basic functionality:
- Add/edit/delete Sitegroups
- Add/edit/delete sites of each type
- RSS (pull) operations
- XML (pull) operations
- XML-RPC (push) operations (would probably have to use Multisite for tests)
- WordPress.com REST (push) (it's possible to run tests on wpcom but this may need to be snowflaked)
from syndication.
Some progress in test-coverage
from syndication.
@philipjohn I've completed all the tests except for the PUSH operations.
You've mentioned that for the XML RPC push tests, we should probably use Multisite, however when running tests, a web server is not involved and so it wouldn't be possible to send requests from one site to another.
The only option here is mocking. However the code isn't written using dependency injection so it's quite difficult. What I am currently thinking is that we try intercept the HTTP calls and return the response we expect to get from the XMLRPC service. The same would go for the REST service.
What do you think of the above? Any other suggestions?
from syndication.
Related Issues (20)
- WP REST API Transport Layer HOT 4
- Enhanced Logging
- Push Syndication and Events Manager HOT 1
- Fix Log Display Screen HOT 1
- featured image upload pb HOT 3
- Track where posts came from HOT 5
- Syndication Loops HOT 4
- Make the Post Type filter optional HOT 2
- PHP 7.2 Compat - create_function is deprecated
- v1 When a new post is published, it doesn't get pushed until the Update button is hit HOT 1
- PHP 7.2 Compat - mcrypt_decrypt() is REMOVED HOT 1
- blank endpoint_url in PushClient::test_connection()
- Scheduled posts are published on associated sites immediately
- Missing Featured Image HOT 1
- Fatal error on php 7.2 HOT 1
- Status v1 and why isn't v2 in public WordPress plugin directory
- Multisite: Multiple copies of the same image in Media Library from syndicated posts
- Required parameters defined after optional ones
- PHP Warning when $this->push_syndicate_settings is still set to null
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from syndication.