WordPress.org

Make WordPress Core

Changeset 731 in tests


Ignore:
Timestamp:
05/30/12 16:45:40 (3 years ago)
Author:
duck_
Message:

Don't bother setting or testing last_updated in test_update_blog_details as it can fail.

update_blog_details() overwrites the value of last_updated. Therefore it's not guaranteed
to be the same as the value of $now. So, a slow test run can result in a failure.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-testcase/test_ms.php

    r728 r731  
    354354        $blog_id = wpmu_create_blog( $current_site->domain, 'test_blogpath', "Test Title", $user_id ); 
    355355        $this->assertInternalType( 'int', $blog_id ); 
    356         $now = time(); 
    357  
    358         $result = update_blog_details( $blog_id, array('domain' => 'example.com', 'path' => 'my_path/', 'last_updated' => $now ) ); 
     356 
     357        $result = update_blog_details( $blog_id, array('domain' => 'example.com', 'path' => 'my_path/') ); 
    359358        $this->assertTrue( $result ); 
    360359 
     
    362361        $this->assertEquals( 'example.com', $blog->domain ); 
    363362        $this->assertEquals( 'my_path/', $blog->path ); 
    364         $this->assertEquals( $now, strtotime( $blog->last_updated ) ); 
    365363        $this->assertEquals( '0', $blog->spam );     
    366364 
     
    370368        $this->assertEquals( 'example2.com', $blog->domain ); 
    371369        $this->assertEquals( 'my_path/', $blog->path ); 
    372         $this->assertEquals( $now, strtotime( $blog->last_updated ) ); 
    373370        $this->assertEquals( '1', $blog->spam ); 
    374371 
Note: See TracChangeset for help on using the changeset viewer.