Merge "Add support for 'hu-formal'"
[lhc/web/wiklou.git] / tests / phpunit / includes / Storage / RevisionStoreRecordTest.php
index 43784b6..3976995 100644 (file)
@@ -458,8 +458,9 @@ class RevisionStoreRecordTest extends MediaWikiTestCase {
                $rev = $this->newRevision( [ 'rev_deleted' => $visibility ] );
 
                // NOTE: slot meta-data is never suppressed, just the content is!
-               $this->assertNotNull( $rev->getSlot( 'main', RevisionRecord::RAW ), 'raw can' );
-               $this->assertNotNull( $rev->getSlot( 'main', RevisionRecord::FOR_PUBLIC ), 'public can' );
+               $this->assertTrue( $rev->hasSlot( 'main' ), 'hasSlot is never suppressed' );
+               $this->assertNotNull( $rev->getSlot( 'main', RevisionRecord::RAW ), 'raw meta' );
+               $this->assertNotNull( $rev->getSlot( 'main', RevisionRecord::FOR_PUBLIC ), 'public meta' );
 
                $this->assertNotNull(
                        $rev->getSlot( 'main', RevisionRecord::FOR_THIS_USER, $user ),
@@ -562,6 +563,13 @@ class RevisionStoreRecordTest extends MediaWikiTestCase {
                $this->assertSame( 'main', $slot->getRole(), 'getRole()' );
        }
 
+       public function testHasSlot() {
+               $rev = $this->newRevision();
+
+               $this->assertTrue( $rev->hasSlot( 'main' ) );
+               $this->assertFalse( $rev->hasSlot( 'xyz' ) );
+       }
+
        public function testGetContent() {
                $rev = $this->newRevision();