public function testGetFilteredImageUrl() { $this->attachment->setId(1); $filerName = 'testFilter'; $this->attachment->setOriginalFilename('test.doc'); $this->router->expects($this->once())->method('generate')->with('oro_filtered_attachment', ['id' => 1, 'filename' => 'test.doc', 'filter' => $filerName]); $this->attachmentManager->getFilteredImageUrl($this->attachment, $filerName); }
public function getTestData() { $correctEntity = new TestAttachment(); $correctEntity->setId(1); $correctEntity->setFilename('test.doc'); $incorrectEntity = new File(); return ['correctEntity' => [$correctEntity, true], 'incorrectEntity' => [$incorrectEntity, false]]; }