public function testPreBegin() { $cw = new cfhCompile_CodeWriter(); $plugin = $this->getMock('cfhCompile_CodeWriter_Plugin_Abstract'); $plugin->expects($this->once())->method('preBegin')->with($this->equalTo($cw)); $b = new cfhCompile_CodeWriter_PluginBroker(); $b->attach($plugin); $b->preBegin($cw); $b->detach($plugin); $b->preBegin($cw); }
/** * Begin a code writer process. */ public function begin() { $this->plugin->preBegin($this); $this->write->begin(); $this->plugin->postBegin($this); }