xc = new XHTMLCompilerMock();
$this->php = new XHTMLCompiler_PHPMock();
if (empty($this->oldPhp) && empty($this->oldXc)) {
$this->oldXc = XHTMLCompiler::getInstance();
$this->oldPhp = XHTMLCompiler::getPHPWrapper();
}
XHTMLCompiler::setInstance($this->xc);
XHTMLCompiler::setPHPWrapper($this->php);
}
function tearDown() {
$this->xc->tally();
$this->php->tally();
XHTMLCompiler::setInstance($this->oldXc);
XHTMLCompiler::setPHPWrapper($this->oldPhp);
}
}
?>