Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: wp-testcase/test-ajax-actions/test_admin_ajax_dim_comments.php
- ===================================================================
- --- wp-testcase/test-ajax-actions/test_admin_ajax_dim_comments.php (revision 676)
- +++ wp-testcase/test-ajax-actions/test_admin_ajax_dim_comments.php (working copy)
- @@ -188,9 +188,14 @@
- $_POST['_page'] = 1;
- $_POST['_url'] = admin_url( 'edit-comments.php' );
- - // Make the request
- - $this->setExpectedException( 'WPAjaxDieException', (string) time() );
- - $this->_handleAjax( 'dim-comment' );
- + // Make the request, look for a timestamp in the exception
- + try {
- + $this->_handleAjax( 'dim-comment' );
- + $this->fail( 'Expected exception' );
- + } catch ( WPAjaxDieException $e ) {
- + $this->assertEquals( 10, strlen( $e->getMessage() ) );
- + $this->assertInternalType( 'integer', $e->getMessage() );
- + }
- }
Add Comment
Please, Sign In to add comment