setMwGlobals( 'wgCaptchaQuestions', $config ); $this->mergeMwGlobalArrayValue( 'wgAutoloadClasses', array( 'QuestyCaptcha' => __DIR__ . '/../QuestyCaptcha/QuestyCaptcha.class.php' ) ); $qc = new QuestyCaptcha(); $this->assertEquals( $expected, $qc->getCaptcha() ); } public static function provideGetCaptcha() { return array( array( array( array( 'question' => 'FooBar', 'answer' => 'Answer!', ), ), array( 'question' => 'FooBar', 'answer' => 'Answer!', ), ), array( array( 'FooBar' => 'Answer!', ), array( 'question' => 'FooBar', 'answer' => 'Answer!', ), ) ); } }