public function testInputEqualsOutput() { $node = new ymcPipeInputNode($this->getMock('ymcPipe')); ymcPipeInputNode::setFetchCallback($this->callback); $node->config->inputName = 'testField'; //@todo fix the type $node->config->inputType = 'string'; $this->assertTrue($node->execute($this->getMock('ymcPipeExecution'))); $this->assertEquals($this->provideInputCallback('testField'), $node->getOutput()); }
public function setUp() { ymcPipeInputNode::setFetchCallback(array($this, 'getInput')); $this->pipe = new ymcPipe(); $this->inNode = new ymcPipeInputNode($this->pipe); $this->inNode->config->inputName = 'html'; }
public static function setFetchCallback($callback) { if (!is_callable($callback)) { //@todo throw new Exception(); } self::$fetchCallback = $callback; }