/** * Returns diff provider. * * @param SourcePipelineEvent $event */ public function onSource(SourcePipelineEvent $event) { $event->addSource($this->provider); }
/** * Gets data and adds source. * * @param SourcePipelineEvent $event */ public function onSource(SourcePipelineEvent $event) { $event->addSource($this->getDocuments()); }
/** * Test addSource with non \Traversable. * * @expectedException \InvalidArgumentException * @expectedExceptionMessage source must be of type \Traversable|array */ public function testAddSourceNotTraversable() { $event = new SourcePipelineEvent(); $event->addSource('foo'); }
/** * Gives data for test. * * @param SourcePipelineEvent $event */ public function onSource(SourcePipelineEvent $event) { $event->addSource(json_decode(file_get_contents(__DIR__ . '/dummyData.json'))); }