Esempio n. 1
0
 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());
 }
Esempio n. 2
0
 public function setUp()
 {
     ymcPipeInputNode::setFetchCallback(array($this, 'getInput'));
     $this->pipe = new ymcPipe();
     $this->inNode = new ymcPipeInputNode($this->pipe);
     $this->inNode->config->inputName = 'html';
 }
Esempio n. 3
0
 public static function setFetchCallback($callback)
 {
     if (!is_callable($callback)) {
         //@todo
         throw new Exception();
     }
     self::$fetchCallback = $callback;
 }