summaryrefslogtreecommitdiffstats
path: root/tests/codeigniter
diff options
context:
space:
mode:
Diffstat (limited to 'tests/codeigniter')
-rw-r--r--tests/codeigniter/core/Output_test.php35
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/codeigniter/core/Output_test.php b/tests/codeigniter/core/Output_test.php
index 728df3bf6..0eeb93f7b 100644
--- a/tests/codeigniter/core/Output_test.php
+++ b/tests/codeigniter/core/Output_test.php
@@ -3,6 +3,16 @@
class Output_test extends CI_TestCase {
public $output;
+ protected $_output_data = <<<HTML
+<html>
+ <head>
+ <title>Basic HTML</title>
+ </head>
+ <body>
+ Test
+ </body>
+</html>
+HTML;
public function set_up()
{
@@ -13,6 +23,31 @@ class Output_test extends CI_TestCase {
// --------------------------------------------------------------------
+ public function test_set_get_append_output()
+ {
+ $append = "<!-- comment /-->\n";
+
+ $this->assertEquals(
+ $this->_output_data.$append,
+ $this->output
+ ->set_output($this->_output_data)
+ ->append_output("<!-- comment /-->\n")
+ ->get_output()
+ );
+ }
+
+ // --------------------------------------------------------------------
+
+ public function test_minify()
+ {
+ $this->assertEquals(
+ str_replace(array("\t", "\n"), '', $this->_output_data),
+ $this->output->minify($this->_output_data)
+ );
+ }
+
+ // --------------------------------------------------------------------
+
public function test_get_content_type()
{
$this->assertEquals('text/html', $this->output->get_content_type());