public function testFilterOnPostBind() { $entity = new AnnotatedClass(); $form = $this->getMockForm(); $form->expects($this->once())->method('isRoot')->will($this->returnValue(true)); $form->expects($this->once())->method('getData')->will($this->returnValue($entity)); $this->delegate->expects($this->once())->method('filterEntity'); $this->listener->onPostSubmit(new FormEvent($form, null)); }