/** * @return ProcessSet */ protected function getProcessSet() { if (!$this->processSet) { $this->processSet = new ProcessSet(); $this->processSet->setPublisher($this->publisher); } return $this->processSet; }
public function testShouldAllowToDefinePublisherUsingSetter() { $set = new ProcessSet(); $publisherMock = $this->getMockBuilder(XmlPublisher::class)->disableOriginalConstructor()->getMock(); $publisherMock->expects($this->once())->method('publishResults')->with('FooClassName', ProcessSet::PROCESS_STATUS_QUEUED, $this->identicalTo(null), $this->identicalTo(null), $this->identicalTo(null)); $set->setPublisher($publisherMock); $set->add(new Process(''), 'FooClassName'); }