WordPress.org

Make WordPress Core

Changeset 649 in tests


Ignore:
Timestamp:
04/08/12 20:53:57 (3 years ago)
Author:
kurtpayne
Message:

Switching $expected and $actual with assertEquals()

Location:
wp-testcase/test-ajax-actions
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • wp-testcase/test-ajax-actions/test_admin_ajax_delete_comments.php

    r552 r649  
    9191         
    9292        // Ensure everything is correct 
    93         $this->assertEquals( (string) $xml->response[0]->comment['id'], $comment->comment_ID ); 
    94         $this->assertEquals( (string) $xml->response['action'], 'delete-comment_' . $comment->comment_ID ); 
     93        $this->assertEquals( $comment->comment_ID, (string) $xml->response[0]->comment['id'] ); 
     94        $this->assertEquals( 'delete-comment_' . $comment->comment_ID, (string) $xml->response['action'] ); 
    9595        $this->assertGreaterThanOrEqual( time() - 10, (int) $xml->response[0]->comment[0]->supplemental[0]->time[0] ); 
    9696        $this->assertLessThanOrEqual( time(), (int) $xml->response[0]->comment[0]->supplemental[0]->time[0] ); 
  • wp-testcase/test-ajax-actions/test_admin_ajax_dim_comments.php

    r517 r649  
    8989 
    9090        // Ensure everything is correct 
    91         $this->assertEquals( (string) $xml->response[0]->comment['id'], $comment->comment_ID ); 
    92         $this->assertEquals( (string) $xml->response['action'], 'dim-comment_' . $comment->comment_ID ); 
     91        $this->assertEquals( $comment->comment_ID, (string) $xml->response[0]->comment['id'] ); 
     92        $this->assertEquals( 'dim-comment_' . $comment->comment_ID, (string) $xml->response['action'] ); 
    9393        $this->assertGreaterThanOrEqual( time() - 10, (int) $xml->response[0]->comment[0]->supplemental[0]->time[0] ); 
    9494        $this->assertLessThanOrEqual( time(), (int) $xml->response[0]->comment[0]->supplemental[0]->time[0] ); 
  • wp-testcase/test-ajax-actions/test_admin_ajax_replyto_comment.php

    r553 r649  
    9595 
    9696        // Check the meta data 
    97         $this->assertEquals( (string) $xml->response[0]->comment['position'], -1 ); 
     97        $this->assertEquals( -1, (string) $xml->response[0]->comment['position'] ); 
    9898        $this->assertGreaterThan( 0, (int) $xml->response[0]->comment['id'] ); 
    9999        $this->assertNotEmpty( (string) $xml->response['action'] ); 
Note: See TracChangeset for help on using the changeset viewer.