/** * @param string $email */ protected function assertValidFormCall($email) { parent::assertValidForm(); $this->request->expects($this->once())->method('isMethod')->with('POST')->will($this->returnValue(true)); $this->form->expects($this->once())->method('submit')->with($this->request); $this->form->expects($this->once())->method('isValid')->will($this->returnValue(true)); $emailSubform = $this->getMock('Symfony\\Component\\Form\\FormInterface'); $emailSubform->expects($this->once())->method('getData')->will($this->returnValue($email)); $this->form->expects($this->once())->method('get')->with('email')->will($this->returnValue($emailSubform)); }