Skip to:
Content

BuddyPress.org

Changeset 8788


Ignore:
Timestamp:
08/11/2014 03:32:24 PM (10 years ago)
Author:
r-a-y
Message:

Tests: Change 'right now' condition test for bp_core_time_since() to '1 minute ago'

boonebgorges was right. The 'right now' condition is too finicky to test
for. Caused this unit test to fail in some instances.

See #4310.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/testcases/core/functions.php

    r8676 r8788  
    351351     * @group bp_core_current_time
    352352     */
    353     public function test_bp_core_time_since_timezone_right_now() {
     353    public function test_bp_core_time_since_timezone_minute_ago() {
    354354        // backup timezone
    355355        $tz_backup = date_default_timezone_get();
     
    358358        date_default_timezone_set( 'Europe/Paris' );
    359359
    360         $this->assertSame( 'right now', bp_core_time_since( time() ) );
     360        $this->assertSame( '1 minute ago', bp_core_time_since( time() - 60 ) );
    361361
    362362        // revert timezone back to normal
Note: See TracChangeset for help on using the changeset viewer.