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