public function testSetAdapter() { $tc = new HTML_QuickForm2_Element_Captcha_TextCAPTCHA(); $tc->setSession(new HTML_QuickForm2_Element_Captcha_Session_Mock()); $tca = Text_CAPTCHA::factory('Word'); $tc->setAdapter($tca); $f = (string) $tc; $adapter = $tc->getAdapter(); $this->assertNotNull($adapter); $this->assertSame($adapter, $tca); }