public function testProcessUpdate() { $existingSection = new Section(); $updatedSection = new Section(); $data = new SectionUpdateData(['section' => $existingSection]); $event = new FormActionEvent($this->getMock('\\Symfony\\Component\\Form\\FormInterface'), $data, 'foo'); $this->sectionService->expects($this->once())->method('updateSection')->with($existingSection, $data)->willReturn($updatedSection); $this->processor->processUpdate($event); self::assertSame($updatedSection, $data->section); }