/** * @since 2.0 * @return void */ public function __construct() { $this->slir = new SLIR(); $this->slir->escapeOutputBuffering(); echo $this->renderTemplate('header.html', array(self::DEFAULT_PAGE_TITLE, self::DEFAULT_CONTENT_TITLE)); if (!defined('__DIR__')) { define('__DIR__', dirname(__FILE__)); } echo '<p>Installing <abbr title="Smart Lencioni Image Resizer">SLIR</abbr>…</p>'; $tasks = array('PHP Version' => 'checkPHPVersion', 'Config File' => 'initializeConfigFile', 'Config Entropy' => 'checkConfigEntropy', 'Error Log' => 'initializeErrorLog'); echo '<div class="responses">'; foreach ($tasks as $label => $function) { echo "<p><strong>{$label}</strong>: "; flush(); $response = $this->{$function}(); echo $this->renderResponse($response); echo '</p>'; flush(); if ($this->responseIsFatal($response)) { echo $this->renderFatalResponseReceivedMessage(); break; } } echo '</div>'; echo $this->renderTemplate('footer.html', array()); }
/** * @test */ public function escapeOutputBuffering() { ob_start(); ob_start(); ob_start(); $inceptionLevel = ob_get_level(); SLIR::escapeOutputBuffering(); $this->assertLessThan($inceptionLevel, ob_get_level()); }