public function testPreWriteSourceInvalidReturnThrowsException()
 {
     $c = '   ';
     $cw = new cfhCompile_CodeWriter();
     $plugin = $this->getMock('cfhCompile_CodeWriter_Plugin_Abstract');
     $plugin->expects($this->once())->method('preWriteSource')->will($this->returnValue($this));
     $b = new cfhCompile_CodeWriter_PluginBroker();
     $b->attach($plugin);
     try {
         $b->preWriteSource($cw, $c);
     } catch (cfhCompile_CodeWriter_Plugin_Exception $e) {
         return;
     }
     $this->fail('Expecting to catch cfhCompile_CodeWriter_Plugin_Exception.');
 }
 /**
  * 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);
 }