- public function testRcHidebyothersFilter_old() {
- $this->setMwGlobals(
- 'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD
- );
-
- $user = $this->getTestUser()->getUser();
- $user->getActorId( wfGetDB( DB_MASTER ) );
- $this->assertConditions(
- [ # expected
- "(rc_user_text = '{$user->getName()}')",
- ],
- [
- 'hidebyothers' => 1,
- ],
- "rc conditions: hidebyothers=1 (logged in)",
- $user
- );
-
- $user = User::newFromName( '10.11.12.13', false );
- $id = $user->getActorId( wfGetDB( DB_MASTER ) );
- $this->assertConditions(
- [ # expected
- "(rc_user_text = '10.11.12.13')",
- ],
- [
- 'hidebyothers' => 1,
- ],
- "rc conditions: hidebyothers=1 (anon)",
- $user
- );
- }
-