/** * @test */ public function thatPipeProcessHandlesViaManager() { $this->messageProviderFactory->expects($this->once())->method('create')->with($this->equalTo(array('raw_message' => self::DUMMY_RAW_MESSAGE)))->will($this->returnValue($this->messageProvider)); $this->manager->expects($this->once())->method('handle')->with($this->logicalAnd($this->isInstanceOf('Diamante\\EmailProcessingBundle\\Model\\Message\\MessageProvider'))); $this->emailProcessingService->pipe(self::DUMMY_RAW_MESSAGE); }
/** * Run Email Process of given message * @param string $input * @return void */ public function pipe($input) { $this->manager->handle($this->rawMessageProviderFactory->create(array('raw_message' => $input))); }