Allow extra slots in write-both/read-new mode.
[lhc/web/wiklou.git] / tests / phpunit / includes / Storage / McrWriteBothRevisionStoreDbTest.php
index c984142..2653c14 100644 (file)
@@ -32,6 +32,7 @@ class McrWriteBothRevisionStoreDbTest extends RevisionStoreDbTestBase {
        }
 
        protected function assertRevisionExistsInDatabase( RevisionRecord $rev ) {
+               // New schema is being written
                $this->assertSelect(
                        'slots',
                        [ 'count(*)' ],
@@ -46,6 +47,16 @@ class McrWriteBothRevisionStoreDbTest extends RevisionStoreDbTestBase {
                        [ [ '1' ] ]
                );
 
+               // Legacy schema is still being written
+               $this->assertSelect(
+                       [ 'revision', 'text' ],
+                       [ 'count(*)' ],
+                       [ 'rev_id' => $rev->getId(), 'rev_text_id > 0' ],
+                       [ [ 1 ] ],
+                       [],
+                       [ 'text' => [ 'INNER JOIN', [ 'rev_text_id = old_id' ] ] ]
+               );
+
                parent::assertRevisionExistsInDatabase( $rev );
        }