Skip to:
Content

BuddyPress.org

Changeset 7922


Ignore:
Timestamp:
02/18/2014 01:51:35 PM (12 years ago)
Author:
boonebgorges
Message:

Unit test for BP_Activity_Activity::get_last_updated()

See #5409

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/testcases/activity/class.BP_Activity_Activity.php

    r7850 r7922  
    396396                $this->assertEquals( $expected, $comments );
    397397        }
     398
     399        /**
     400         * @group get_last_updated
     401         */
     402        public function test_get_last_updated() {
     403                $now = time();
     404                $a1 = $this->factory->activity->create( array(
     405                        'recorded_time' => date( 'Y-m-d h:i:s', $now - 500 ),
     406                ) );
     407                $a2 = $this->factory->activity->create( array(
     408                        'recorded_time' => date( 'Y-m-d h:i:s', $now - 100 ),
     409                ) );
     410                $a3 = $this->factory->activity->create( array(
     411                        'recorded_time' => date( 'Y-m-d h:i:s', $now - 300 ),
     412                ) );
     413
     414                $this->assertSame( date( 'Y-m-d h:i:s', $now - 100 ), BP_Activity_Activity::get_last_updated() );
     415        }
    398416}
Note: See TracChangeset for help on using the changeset viewer.