Skip to content

Commit ec76c40

Browse files
authored
Tests: Convert timestamp to int for comparison (#1556)
1 parent f988437 commit ec76c40

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tests/includes/scheduler/class-test-actor.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,6 @@ public function test_actor_profile_update_sets_updated_attribute() {
318318
$activity = \json_decode( $post->post_content, true );
319319

320320
// Verify the updated attribute is set and matches the post's modified date.
321-
$expected_updated = gmdate( 'Y-m-d\TH:i:s\Z', strtotime( $post->post_modified ) );
322-
$this->assertEqualsWithDelta( $expected_updated, $activity['updated'], 2, 'Updated attribute does not match post modified date.' );
321+
$this->assertEqualsWithDelta( strtotime( $post->post_modified ), strtotime( $activity['updated'] ), 2, 'Updated attribute does not match post modified date.' );
323322
}
324323
}

0 commit comments

Comments
 (0)