Remove trailing whitespace.
[xhtml-compiler.git] / tests / XHTMLCompilerHarness.php
bloba4866782ed8cf310d0e660cdbcacd4020a4acd67
1 <?php
3 class XHTMLCompilerHarness extends UnitTestCase
6 /**
7 * Instances of the XHTMLCompiler and XHTMLCompiler_PHP mocks we
8 * can configure.
9 */
10 protected $php, $xc;
12 /**
13 * The old XHTMLCompiler and XHTMLCompiler_PHP instances that are
14 * restored after testing.
16 protected $oldPhp, $oldXc;
18 function setUp() {
19 $this->xc = new XHTMLCompilerMock();
20 $this->php = new XHTMLCompiler_PHPMock();
21 if (empty($this->oldPhp) && empty($this->oldXc)) {
22 $this->oldXc = XHTMLCompiler::getInstance();
23 $this->oldPhp = XHTMLCompiler::getPHPWrapper();
25 XHTMLCompiler::setInstance($this->xc);
26 XHTMLCompiler::setPHPWrapper($this->php);
29 function tearDown() {
30 XHTMLCompiler::setInstance($this->oldXc);
31 XHTMLCompiler::setPHPWrapper($this->oldPhp);