public function testPreCommit() { $cr = new cfhCompile_ClassRegistry(); $cw = new cfhCompile_CodeWriter(); $plugin = $this->getMock('cfhCompile_CodeWriter_Plugin_Abstract'); $plugin->expects($this->once())->method('preCommit')->with($this->equalTo($cw)); $b = new cfhCompile_CodeWriter_PluginBroker(); $b->attach($plugin); $b->preCommit($cw, $cr); $b->detach($plugin); $b->preCommit($cw, $cr); }
/** * Commit a code writer process. * @param cfhCompile_ClassRegistry $classRegistry */ public function commit(cfhCompile_ClassRegistry $classRegistry) { $this->plugin->preCommit($this, $classRegistry); $this->write->commit($classRegistry); $this->plugin->postCommit($this, $classRegistry); }