- $testCase->assertNull( $rev->getSize() );
- $testCase->assertNull( $rev->getParentId() );
- $testCase->assertNull( $rev->getSha1() );
- $testCase->assertSame( 'text/x-wiki', $rev->getContentFormat() );
- $testCase->assertSame( 'wikitext', $rev->getContentModel() );
+ // parent ID may be null
+ $testCase->assertSame( null, $rev->getParentId(), 'revision id' );
+
+ // given fields
+ $testCase->assertSame( $rev->getTimestamp(), '20171017114835', 'timestamp' );
+ $testCase->assertSame( $rev->getUserText(), '127.0.0.1', 'user name' );
+ $testCase->assertSame( $rev->getUser(), 0, 'user id' );
+ $testCase->assertSame( $rev->getComment(), 'Goat Comment!' );
+ $testCase->assertSame( false, $rev->isMinor(), 'minor edit' );
+ $testCase->assertSame( 0, $rev->getVisibility(), 'visibility flags' );
+
+ // computed fields
+ $testCase->assertNotNull( $rev->getSize(), 'size' );
+ $testCase->assertNotNull( $rev->getSha1(), 'hash' );
+
+ // NOTE: model and format will be detected based on the namespace of the (mock) title
+ $testCase->assertSame( 'text/x-wiki', $rev->getContentFormat(), 'format' );
+ $testCase->assertSame( 'wikitext', $rev->getContentModel(), 'model' );