chnm / Scripto

Scripto is an open source documentary transcription tool library written in PHP.
34 stars 6 forks source link

Write Test Cases for the MediaWiki API Client #3

Closed jimsafley closed 13 years ago

jimsafley commented 13 years ago

This may require the developer to install a testing MediaWiki instance, separate from the production instance. The upshot is test coverage of Scipto's interface with MediaWiki, the reliability of which should be considered unresolved.

jimsafley commented 13 years ago

Consider adding a property flag to Scripto_Service_MediaWiki that suppresses getting and setting browser-based cookies. Getting is handled in __construct(). Setting is handled in login().This should allow actions that require credentials, such as login, logout, and edit (when required).

If this works, add TEST_MEDIAWIKI_USERNAME and TEST_MEDIAWIKI_PASSWORD constants to the configuration file. This should preferably be a user with bureaucrat or sysop permissions.

jimsafley commented 13 years ago

Consider adding getDeleteToken() and deletePage() methods to Scripto_Service_MediaWiki. This would enable complete deletion of the test page, instead of simply clearing it and incrementing the page history unnecessarily. This would require bureaucrat or sysop permissions.

jimsafley commented 13 years ago

Fixed:

https://github.com/chnm/Scripto/commit/718e127fbe38ec10e4545078917ee476777a683d https://github.com/chnm/Scripto/commit/3516054d3eb99b2551f4c0a81abcf5462e3d483b

Did not add delete page functionality.