public function testPostWriteSource() { $c = '/* source */'; $cw = new cfhCompile_CodeWriter(); $plugin = $this->getMock('cfhCompile_CodeWriter_Plugin_Abstract'); $plugin->expects($this->once())->method('postWriteSource')->with($this->equalTo($cw), $this->equalTo($c)); $b = new cfhCompile_CodeWriter_PluginBroker(); $b->attach($plugin); $b->postWriteSource($cw, $c); $b->detach($plugin); $b->postWriteSource($cw, $c); }
/** * Writes source code. * * @param String $sourceCode */ public function writeSource($sourceCode) { $sourceCode = $this->plugin->preWriteSource($this, $sourceCode); $this->write->writeSource($sourceCode); $this->plugin->postWriteSource($this, $sourceCode); }