public function testSetGetRegistrationOptions() { $options = $this->getMock('ZfcUser\\Options\\RegistrationOptionsInterface'); $options->expects($this->once())->method('getEnableUsername')->will($this->returnValue(false)); $options->expects($this->once())->method('getEnableDisplayName')->will($this->returnValue(false)); $options->expects($this->any())->method('getUseRegistrationFormCaptcha')->will($this->returnValue(false)); $form = new Form(null, $options); $this->assertSame($options, $form->getRegistrationOptions()); $optionsNew = $this->getMock('ZfcUser\\Options\\RegistrationOptionsInterface'); $form->setRegistrationOptions($optionsNew); $this->assertSame($optionsNew, $form->getRegistrationOptions()); }