Guest User

Untitled

a guest
Sep 26th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. Index: wp-testcase/test-ajax-actions/test_admin_ajax_dim_comments.php
  2. ===================================================================
  3. --- wp-testcase/test-ajax-actions/test_admin_ajax_dim_comments.php (revision 676)
  4. +++ wp-testcase/test-ajax-actions/test_admin_ajax_dim_comments.php (working copy)
  5. @@ -188,9 +188,14 @@
  6. $_POST['_page'] = 1;
  7. $_POST['_url'] = admin_url( 'edit-comments.php' );
  8.  
  9. - // Make the request
  10. - $this->setExpectedException( 'WPAjaxDieException', (string) time() );
  11. - $this->_handleAjax( 'dim-comment' );
  12. + // Make the request, look for a timestamp in the exception
  13. + try {
  14. + $this->_handleAjax( 'dim-comment' );
  15. + $this->fail( 'Expected exception' );
  16. + } catch ( WPAjaxDieException $e ) {
  17. + $this->assertEquals( 10, strlen( $e->getMessage() ) );
  18. + $this->assertInternalType( 'integer', $e->getMessage() );
  19. + }
  20. }
Add Comment
Please, Sign In to add comment