Skip to content

Instantly share code, notes, and snippets.

@Pchelolo
Created June 10, 2020 05:31
Show Gist options
  • Save Pchelolo/12d235326e248c1c2148f74c9388a197 to your computer and use it in GitHub Desktop.
Save Pchelolo/12d235326e248c1c2148f74c9388a197 to your computer and use it in GitHub Desktop.
Method call
mediawiki
extensions/MathSearch/includes/specials
SpecialMlpEval.php
SpecialMlpEval
printFormulaRef
$this->selectedMathTag->getWikiText(), $this->revision->getTimestamp() );
extensions/Video/includes/specials
SpecialUndeleteWithVideoSupport.php
SpecialUndeleteWithVideoSupport
diffHeader
'timestamp' => wfTimestamp( TS_MW, $rev->getTimestamp() )
$lang->userTimeAndDate( $rev->getTimestamp(), $user ),
$lang->userDate( $rev->getTimestamp(), $user ),
$lang->userTime( $rev->getTimestamp(), $user )
extensions/Wikibase/repo/includes/Diff
EntityContentDiffView.php
EntityContentDiffView
getRevisionHeader
$revtimestamp = $rev->getTimestamp();
includes
Linker.php
Linker
getRevDeleteLink
'ids' => $revRecord->getTimestamp()
includes/changes
CategoryMembershipChange.php
CategoryMembershipChange
__construct
$this->timestamp = $revision->getTimestamp();
includes/diff
DifferenceEngine.php
DifferenceEngine
getRevisionHeader
$revtimestamp = $rev->getTimestamp();
includes/page
WikiPage.php
WikiPage
updateIfNewerOn
if ( MWTimestamp::convert( TS_MW, $row->rev_timestamp ) >= $revision->getTimestamp() ) {
updateRevisionOn
'page_touched' => $dbw->timestamp( $revision->getTimestamp() ),
tests/phpunit/includes
RevisionDbTest.php
RevisionDbTest
assertRevEquals
$this->assertEquals( $orig->getTimestamp(), $rev->getTimestamp() );
testGetRecentChange
$this->assertEquals( $rev->getTimestamp(), $recentChange->getAttribute( 'rc_timestamp' ) );
testGetTimestamp
$this->assertIsString( $rev->getTimestamp() );
$this->assertTrue( strlen( $rev->getTimestamp() ) == strlen( 'YYYYMMDDHHMMSS' ) );
$this->assertStringContainsString( substr( $testTimestamp, 0, 10 ), $rev->getTimestamp() );
testInsertOn
$orig->getTimestamp(),
testLoadFromTimestamp
$this->testPage->getRevision()->getTimestamp()
testUserWasLastToEdit
$since = $revisions[$sinceIdx]->getTimestamp();
RevisionTest.php
RevisionTest
provideConstructFromRow
$testCase->assertSame( '20171017114835', $rev->getTimestamp() );
$testCase->assertSame( $rev->getTimestamp(), '20171017114835', 'timestamp' );
testLoadFromTitle
$this->assertEquals( $row->rev_timestamp, $revision->getTimestamp() );
tests/phpunit/includes/page
PageArchiveTest.php
PageArchiveTest
testGetArchivedRevision
$this->assertSame( $this->ipRev->getTimestamp(), $rev->getTimestamp() );
WikiPageDbTest.php
WikiPageDbTest
testUpdateIfNewerOn_newerRevision
wfTimestamp( TS_UNIX, $initialRevision->getTimestamp() ) + 1
testUpdateIfNewerOn_olderRevision
wfTimestamp( TS_UNIX, $initialRevision->getTimestamp() ) - 1
tests/phpunit/includes/Revision
RevisionStoreDbTestBase.php
RevisionStoreDbTestBase
assertRevisionRecordMatchesRevision
$this->assertSame( $rev->getTimestamp(), $record->getTimestamp() );
revisionToRow
'rev_timestamp' => $this->db->timestamp( $rev->getTimestamp() ),
testGetRevisionByTimestamp
$rev->getTimestamp()
testGetTimestampFromId_found
$this->assertSame( $rev->getTimestamp(), $result );
testLoadRevisionFromTimestamp
$revOne->getTimestamp()
$revTwo->getTimestamp()
Usage in comments
mediawiki
tests/phpunit/includes
RevisionDbTest.php
RevisionDbTest
* @covers Revision::getTimestamp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment