public function testPostCommit()
 {
     $cr = new cfhCompile_ClassRegistry();
     $cw = new cfhCompile_CodeWriter();
     $plugin = $this->getMock('cfhCompile_CodeWriter_Plugin_Abstract');
     $plugin->expects($this->once())->method('postCommit')->with($this->equalTo($cw));
     $b = new cfhCompile_CodeWriter_PluginBroker();
     $b->attach($plugin);
     $b->postCommit($cw, $cr);
     $b->detach($plugin);
     $b->postCommit($cw, $cr);
 }
Exemplo n.º 2
0
 /**
  * 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);
 }