public function testPostGetSourceCodeEmptySourceStringPassesAndReturnsNull()
 {
     $c = new cfhCompile_Class_Reflection($this);
     $cr = new cfhCompile_CodeReader();
     $code = '    ';
     $plugin = $this->getMock('cfhCompile_CodeReader_Plugin_Abstract');
     $plugin->expects($this->any())->method('postGetSourceCode')->with($this->equalTo($cr), $this->equalTo($c), $this->equalTo(NULL))->will($this->returnValue($code));
     $b = new cfhCompile_CodeReader_PluginBroker();
     $b->attach($plugin);
     $this->assertNull($b->postGetSourceCode($cr, $c, $code));
 }
Пример #2
0
 /**
  * @param cfhCompile_CodeReader_Plugin_Interface $plugin
  */
 public function attachPlugin(cfhCompile_CodeReader_Plugin_Interface $plugin)
 {
     $this->plugin->attach($plugin);
 }