Changeset 903 in tests for trunk/includes/testcase-ajax.php
- Timestamp:
- 07/16/2012 05:24:25 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/includes/testcase-ajax.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/testcase-ajax.php
r868 r903 16 16 */ 17 17 abstract class WP_Ajax_UnitTestCase extends WP_UnitTestCase { 18 18 19 19 /** 20 20 * Last AJAX response. This is set via echo -or- wp_die. 21 * @var type 21 * @var type 22 22 */ 23 23 protected $_last_response = ''; … … 25 25 /** 26 26 * List of ajax actions called via POST 27 * @var type 27 * @var type 28 28 */ 29 29 protected $_core_actions_get = array( 'fetch-list', 'ajax-tag-search', 'wp-compression-test', 'imgedit-preview', 'oembed_cache' ); … … 37 37 /** 38 38 * List of ajax actions called via GET 39 * @var type 39 * @var type 40 40 */ 41 41 protected $_core_actions_post = array( … … 77 77 $this->factory->post->create_many( 5 ); 78 78 } 79 79 80 80 /** 81 81 * Tear down the test fixture. … … 124 124 * $this->setExpectedException( 'WPAjaxDieContinueException', 'something contained in $message' ); 125 125 * </code> 126 * @param string $message 126 * @param string $message 127 127 */ 128 128 public function dieHandler( $message ) { … … 143 143 * Switch between user roles 144 144 * E.g. administrator, editor, author, contributor, subscriber 145 * @param string $role 145 * @param string $role 146 146 */ 147 147 protected function _setRole( $role ) { … … 156 156 * Capture the output via output buffering, and if there is any, store 157 157 * it in $this->_last_message. 158 * @param string $action 158 * @param string $action 159 159 */ 160 160 protected function _handleAjax($action) { 161 161 162 162 // Start output buffering 163 163 ini_set( 'implicit_flush', false );
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)