public function testExecute() { $content = 'test'; $this->converter->expects($this->once())->method('getCsvFile')->willReturn($content); $this->fileFactory->expects($this->once())->method('create')->with('export.csv', $content, 'var')->willReturn($content); $this->assertEquals($content, $this->controller->execute()); }