/** helper to test SpecialRecentchanges::buildMainQueryConds() */ private function assertConditions($expected, $requestOptions = null, $message = '') { $context = new RequestContext(); $context->setRequest(new FauxRequest($requestOptions)); # setup the rc object $this->rc = new SpecialRecentChanges(); $this->rc->setContext($context); $formOptions = $this->rc->setup(null); # Filter out rc_timestamp conditions which depends on the test runtime # This condition is not needed as of march 2, 2011 -- hashar # @todo FIXME: Find a way to generate the correct rc_timestamp $queryConditions = array_filter($this->rc->buildMainQueryConds($formOptions), 'SpecialRecentchangesTest::filterOutRcTimestampCondition'); $this->assertEquals($expected, $queryConditions, $message); }